Skip to content

Commit

Permalink
const-oid: clippy fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Jan 27, 2025
1 parent 8a11e91 commit 541d76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion const-oid/src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const fn base128_byte(arc: Arc, pos: usize, total: usize) -> Result<u8> {
debug_assert!(pos < total);
let last_byte = checked_add!(pos, 1) == total;
let mask = if last_byte { 0 } else { 0b10000000 };
let shift = checked_sub!(checked_sub!(total, pos), 1) * 7;
let shift = checked_mul!(checked_sub!(checked_sub!(total, pos), 1), 7);
Ok(((arc >> shift) & 0b1111111) as u8 | mask)
}

Expand Down

0 comments on commit 541d76d

Please sign in to comment.