diff --git a/src/repr/bitboard.rs b/src/repr/bitboard.rs index 3e48cbc..7f1638b 100644 --- a/src/repr/bitboard.rs +++ b/src/repr/bitboard.rs @@ -101,11 +101,11 @@ impl BitBoard { } pub const fn bitor_assign(&mut self, other: Self) { - self.0 = self.0 | other.0; + self.0 |= other.0; } pub const fn bitand_assign(&mut self, other: Self) { - self.0 = self.0 & other.0; + self.0 &= other.0; } pub const fn not(self) -> Self { diff --git a/src/repr/board.rs b/src/repr/board.rs index 799a117..6153438 100644 --- a/src/repr/board.rs +++ b/src/repr/board.rs @@ -231,7 +231,7 @@ impl Board { } let mut self_copy = *self; - if let Ok(_) = self_copy.place(coord, piece) { + if self_copy.place(coord, piece).is_ok() { Some(self_copy) } else { None