Skip to content

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNummelin committed Jan 24, 2024
1 parent c8bba56 commit 1a46720
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions physx-sys/pxbind/src/generator/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl<'ast> crate::consumer::FlagsBinding<'ast> {
})
.enumerate()
{
remainder &= !bit;
remainder &= !bit;
is_combo = true;
if i > 0 {
writes!(w, " | ");
Expand All @@ -140,11 +140,10 @@ impl<'ast> crate::consumer::FlagsBinding<'ast> {
// emit the raw value
if !is_combo {
writes!(w, "0x{val:08x}");
}
else if remainder != 0 {
} else if remainder != 0 {
if remainder & (remainder - 1) == 0 {
writes!(w, "| 1 << {}", remainder.ilog2());
} else {
} else {
writes!(w, "| 0x{remainder:08x}");
}
}
Expand Down

0 comments on commit 1a46720

Please sign in to comment.