diff --git a/src/chess/bitboard.rs b/src/chess/bitboard.rs index 5d66b2d..d3ba633 100644 --- a/src/chess/bitboard.rs +++ b/src/chess/bitboard.rs @@ -164,6 +164,8 @@ impl Bitboard { } #[inline(always)] + #[allow(clippy::allow_attributes, reason = "Only used in non-release mode")] + #[allow(unused, reason = "Only used in non-release mode")] pub fn flip_vertically(self) -> Self { Self(u64::swap_bytes(self.0)) } diff --git a/src/chess/board.rs b/src/chess/board.rs index d44bfb9..40e1254 100644 --- a/src/chess/board.rs +++ b/src/chess/board.rs @@ -128,6 +128,8 @@ impl Board { enemy_attackers.any() } + #[allow(clippy::allow_attributes, reason = "Only used in non-release mode")] + #[allow(unused, reason = "Only used in non-release mode")] pub fn flip_vertically(&self) -> Self { let [white_colors, black_colors] = self.colors.inner(); let [pawns, knights, bishops, rooks, queens, king] = self.pieces; diff --git a/src/chess/square.rs b/src/chess/square.rs index 1339e89..b72f0c7 100644 --- a/src/chess/square.rs +++ b/src/chess/square.rs @@ -61,7 +61,7 @@ impl File { } } - pub fn bitboard(&self) -> Bitboard { + pub fn bitboard(self) -> Bitboard { match self { Self::A => bitboards::A_FILE, Self::B => bitboards::B_FILE,