From 3c21bde4b0d93aabd6fb3ea09160677deafc0e21 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 17 Oct 2023 13:45:50 -0500 Subject: [PATCH] fmt --- crates/tests/metadata/tests/attribute_enum.rs | 19 ++++++------------- crates/tests/metadata/tests/fn_call_size.rs | 2 +- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/crates/tests/metadata/tests/attribute_enum.rs b/crates/tests/metadata/tests/attribute_enum.rs index 0d756205b8..6393b8cf67 100644 --- a/crates/tests/metadata/tests/attribute_enum.rs +++ b/crates/tests/metadata/tests/attribute_enum.rs @@ -6,16 +6,13 @@ fn attribute_enum() { let reader = &Reader::new(files); let (method, _) = reader - .get_method_def( - "Windows.Win32.UI.WindowsAndMessaging", - "SetWindowLongPtrA", - ) + .get_method_def("Windows.Win32.UI.WindowsAndMessaging", "SetWindowLongPtrA") .next() .unwrap(); check_attr_arg_enum( method - .find_attribute( "SupportedArchitectureAttribute") + .find_attribute("SupportedArchitectureAttribute") .unwrap(), "", "Windows.Win32.Foundation.Metadata.Architecture", @@ -29,20 +26,16 @@ fn attribute_enum() { .unwrap(); check_attr_arg_enum( - def.find_attribute( "GCPressureAttribute").unwrap(), + def.find_attribute("GCPressureAttribute").unwrap(), "amount", "Windows.Foundation.Metadata.GCPressureAmount", 2, ); } -fn check_attr_arg_enum( - attr: Attribute, - arg_name: &str, - expected_type: &str, - expected_value: i32, -) { - let (_, value) = attr.args() +fn check_attr_arg_enum(attr: Attribute, arg_name: &str, expected_type: &str, expected_value: i32) { + let (_, value) = attr + .args() .drain(..) .find(|(name, _)| name == arg_name) .unwrap(); diff --git a/crates/tests/metadata/tests/fn_call_size.rs b/crates/tests/metadata/tests/fn_call_size.rs index a57f824ea4..767270bc54 100644 --- a/crates/tests/metadata/tests/fn_call_size.rs +++ b/crates/tests/metadata/tests/fn_call_size.rs @@ -316,7 +316,7 @@ fn function_size(reader: &Reader, namespace: &str, name: &str) -> usize { .get_method_def(namespace, name) .next() .expect("Function not found"); - method.signature(&[]).size() + method.signature(&[]).size() } fn struct_size(reader: &Reader, namespace: &str, name: &str) -> usize {