Skip to content

Commit

Permalink
Tweaks to match CI rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adetaylor committed Feb 21, 2025
1 parent 61cdc00 commit 37757ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,11 @@ pub fn compare_method_info(
unreachable!()
};

if expected_parent != generated_parent
|| expected_cpp_explicit != generated_cpp_explicit
|| expected_cpp_special_member != generated_cpp_special_member
|| expected_cpp_virtual != generated_cpp_virtual
|| expected_cpp_visibility != generated_cpp_visibility
if expected_parent != generated_parent ||
expected_cpp_explicit != generated_cpp_explicit ||
expected_cpp_special_member != generated_cpp_special_member ||
expected_cpp_virtual != generated_cpp_virtual ||
expected_cpp_visibility != generated_cpp_visibility
{
return false;
}
Expand Down
14 changes: 8 additions & 6 deletions bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3077,12 +3077,14 @@ impl Method {
utils::call_discovered_item_callback(ctx, function_item, || {
let cpp_virtual = match function.kind() {
FunctionKind::Function => None,
FunctionKind::Method(method_kind) => if method_kind.is_pure_virtual() {
Some(Virtualness::PureVirtual)
} else if method_kind.is_virtual() {
Some(Virtualness::Virtual)
} else {
None
FunctionKind::Method(method_kind) => {
if method_kind.is_pure_virtual() {
Some(Virtualness::PureVirtual)
} else if method_kind.is_virtual() {
Some(Virtualness::Virtual)
} else {
None
}
}
};
DiscoveredItem::Method {
Expand Down

0 comments on commit 37757ee

Please sign in to comment.