Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Oct 17, 2023
1 parent 6fb5a59 commit 3c21bde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
19 changes: 6 additions & 13 deletions crates/tests/metadata/tests/attribute_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/metadata/tests/fn_call_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3c21bde

Please sign in to comment.