Clippy shenanigans

This commit is contained in:
crumblingstatue 2023-04-14 11:48:19 +02:00
parent 432be07370
commit c1a4c0db87
2 changed files with 4 additions and 0 deletions

View file

@ -16,6 +16,7 @@ pub fn set_nth_bit<N: PrimInt + BitOrAssign + BitAndAssign>(number: &mut N, n: u
}
#[test]
#[allow(clippy::bool_assert_comparison)]
fn test_nth_bit_set() {
let number: u8 = 0b0100_0100;
assert_eq!(nth_bit_set(number, 0), false);
@ -31,6 +32,7 @@ fn test_nth_bit_set() {
}
#[test]
#[allow(clippy::bool_assert_comparison)]
fn test_set_nth_bit() {
let mut number: u8 = 0b0000_0000;
set_nth_bit(&mut number, 0, true);

View file

@ -343,6 +343,8 @@ impl Tile {
}
pub const REGION_CHUNK_EXTENT: u8 = 8;
#[allow(clippy::assertions_on_constants)]
const _: () = assert!(
REGION_CHUNK_EXTENT * REGION_CHUNK_EXTENT <= 64,
"A region file uses an existence bitset that's a 64 bit integer"