Skip to content

Commit

Permalink
🥢 Tidy up ilog2
Browse files Browse the repository at this point in the history
  • Loading branch information
Philogy committed Oct 23, 2024
1 parent 50ea1bf commit d018662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn value_push_size(value: usize, allow_push0: bool) -> u8 {
match (value, allow_push0) {
(0, true) => 0,
(0, false) => 1,
(x, _) => x.checked_ilog2().unwrap() as u8 / 8 + 1,
(x, _) => x.ilog2() as u8 / 8 + 1,
}
}

Expand Down

0 comments on commit d018662

Please sign in to comment.