mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 11:45:01 +01:00
Clippy shenanigans
This commit is contained in:
parent
432be07370
commit
c1a4c0db87
2 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue