We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e877f33 commit ac8d8d1Copy full SHA for ac8d8d1
1 file changed
src/board.rs
@@ -955,7 +955,7 @@ impl Board {
955
if moved == Piece::Knight {
956
result.checkers ^= get_knight_moves(ksq) & dest_bb;
957
} else if moved == Piece::Pawn {
958
- if let Some(Piece::Knight) = m.get_promotion() {
+ if matches!(m.get_promotion(), Some(Piece::Knight)) {
959
result.xor(Piece::Pawn, dest_bb, self.side_to_move);
960
result.xor(Piece::Knight, dest_bb, self.side_to_move);
961
0 commit comments