diff --git a/src/bitboard.rs b/src/bitboard.rs index ab2bef1..cf34966 100644 --- a/src/bitboard.rs +++ b/src/bitboard.rs @@ -45,14 +45,14 @@ impl BitBoard { #[cfg(not(feature = "bitvec"))] pub const fn get(&self, row: usize, col: usize) -> bool { - ((self.0 >> Self::get_index(row, col)) & 1) != 0 + ((self.0 >> Self::get_index(row, col)) & 0b1) != 0b0 } #[cfg(not(feature = "bitvec"))] pub const fn set(&mut self, row: usize, col: usize, value: bool) { let index = Self::get_index(row, col); // PERF! branchless setting of bit (~+3% perf bump) - self.0 &= !(1 << index); // clear bit + self.0 &= !(0b1 << index); // clear bit self.0 |= (value as BitBoardInner) << index; // set bit (if needed) }