diff --git a/src/repr/bitboard.rs b/src/repr/bitboard.rs index df6b852..08c1a00 100644 --- a/src/repr/bitboard.rs +++ b/src/repr/bitboard.rs @@ -44,16 +44,16 @@ impl BitBoard { self.get_by_index(get_index(row, col)) } - #[cfg(not(feature = "bitvec"))] - const fn get_by_index(&self, index: usize) -> bool { - ((self.0 >> index) & 0b1) != 0b0 - } - #[const_fn(cfg(not(feature = "bitvec")))] pub const fn set(&mut self, row: usize, col: usize, value: bool) { self.set_by_index(get_index(row, col), value); } + #[cfg(not(feature = "bitvec"))] + const fn get_by_index(&self, index: usize) -> bool { + ((self.0 >> index) & 0b1) != 0b0 + } + #[cfg(not(feature = "bitvec"))] const fn set_by_index(&mut self, index: usize, value: bool) { // PERF! branchless setting of bit (~+3% perf bump)