Silence useless clippy warnings

Those warnings are either explicitly accounted for in the code, or make
the code look worse if fixed.
This commit is contained in:
Bruno BELANYI 2022-07-29 19:24:47 +02:00
parent 2e410ba104
commit eefa707c07
3 changed files with 3 additions and 0 deletions

View file

@ -67,6 +67,7 @@ impl CastleRights {
}
/// Add some [CastleRights], and return the resulting [CastleRights].
#[allow(clippy::should_implement_trait)]
#[inline(always)]
pub fn add(self, to_remove: CastleRights) -> Self {
// SAFETY: we know the value is in-bounds

View file

@ -190,6 +190,7 @@ impl ChessBoard {
fn is_valid(&self) -> bool {
// Don't overlap pieces.
for piece in Piece::iter() {
#[allow(clippy::collapsible_if)]
for other in Piece::iter() {
if piece != other {
if !(self.piece_occupancy(piece) & self.piece_occupancy(other)).is_empty() {

View file

@ -84,6 +84,7 @@ mod shift {
impl Move {
/// Construct a new move.
#[allow(clippy::too_many_arguments)]
#[inline(always)]
fn new(
piece: Piece,