Skip to content

Commit c7676f0

Browse files
committed
style(integration): make code more idiomatic
1 parent c2dc13b commit c7676f0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bindgen-integration/build.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ impl ParseCallbacks for MacroCallback {
141141
info: &bindgen::callbacks::AttributeInfo<'_>,
142142
) -> Vec<String> {
143143
if info.name == "Test" {
144-
assert!(info.kind == AttributeItemKind::Struct);
145-
return vec!["#[cfg_attr(test, derive(PartialOrd))]".into()];
144+
assert_eq!(info.kind, AttributeItemKind::Struct);
145+
vec!["#[cfg_attr(test, derive(PartialOrd))]".into()]
146146
} else if info.name == "coord" {
147-
assert!(
148-
info.kind ==
149-
AttributeItemKind::Function(FunctionKind::Function)
147+
assert_eq!(
148+
info.kind,
149+
AttributeItemKind::Function(FunctionKind::Function)
150150
);
151-
return vec!["#[must_use]".into()];
151+
vec!["#[must_use]".into()]
152152
}
153-
return vec![];
153+
vec![]
154154
}
155155
}
156156

0 commit comments

Comments
 (0)