Skip to content

Commit

Permalink
Fix clippy warning on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Dec 28, 2024
1 parent 2dd7af4 commit 924ec6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fuzz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub fn generate_usize(data: &mut &[u8], min: usize, max: usize) -> usize {
};
let mut res = 0;
for _ in 0 .. log / 8 + 1 {
res = res << 8 | generate(data, 0, 255) as usize;
res = (res << 8) | generate(data, 0, 255) as usize;
}
if usize::MIN < min || max < usize::MAX {
res = min + res % (max - min + 1);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ fn decode_block<B: Static<usize>, M: Static<bool>>(
x |= u64::from(y) << (bit * order(msb, dec(bit), j));
}
for (j, output) in output.iter_mut().enumerate() {
*output = (x >> (8 * order(msb, enc(bit), j)) & 0xff) as u8;
*output = ((x >> (8 * order(msb, enc(bit), j))) & 0xff) as u8;
}
Ok(())
}
Expand Down

0 comments on commit 924ec6d

Please sign in to comment.