Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jgilchrist committed Dec 5, 2024
1 parent 2af1bd3 commit 99d08d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/chess/bitboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 2 additions & 0 deletions src/chess/board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/chess/square.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 99d08d3

Please sign in to comment.