const nits
This commit is contained in:
@@ -63,6 +63,8 @@ impl BitBoard {
|
||||
self.0 &= !(1 << index)
|
||||
}
|
||||
|
||||
// PERF! was going to optimize setting multiple indexes,
|
||||
// seems rust does this for us: https://godbolt.org/z/ddj3dMxsP
|
||||
#[cfg(not(feature = "bitvec"))]
|
||||
const fn set_bit(&mut self, index: usize) {
|
||||
self.0 |= 1 << index
|
||||
@@ -84,7 +86,7 @@ impl BitBoard {
|
||||
|
||||
// works on both `bitvec` and native (const on native)
|
||||
#[const_fn(cfg(not(feature = "bitvec")))]
|
||||
pub fn count(&self) -> usize {
|
||||
pub const fn count(&self) -> usize {
|
||||
self.0.count_ones() as usize
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user