diff --git a/src/board/direction.rs b/src/board/direction.rs index cfed3cb..6b350a0 100644 --- a/src/board/direction.rs +++ b/src/board/direction.rs @@ -140,7 +140,7 @@ impl Direction { while !board.is_empty() { board = self.move_board(board); - res = res | board; + res |= board; if !(board & blockers).is_empty() { break; } diff --git a/src/movegen/wizardry/mask.rs b/src/movegen/wizardry/mask.rs index eed93a0..b3d4f46 100644 --- a/src/movegen/wizardry/mask.rs +++ b/src/movegen/wizardry/mask.rs @@ -18,16 +18,16 @@ pub fn generate_rook_mask(square: Square) -> Bitboard { let mask = { let mut mask = Bitboard::EMPTY; if square.file() != File::A { - mask = mask | File::A.into_bitboard() + mask |= File::A.into_bitboard() }; if square.file() != File::H { - mask = mask | File::H.into_bitboard() + mask |= File::H.into_bitboard() }; if square.rank() != Rank::First { - mask = mask | Rank::First.into_bitboard() + mask |= Rank::First.into_bitboard() }; if square.rank() != Rank::Eighth { - mask = mask | Rank::Eighth.into_bitboard() + mask |= Rank::Eighth.into_bitboard() }; mask };