Allow some clippy warnings

This commit is contained in:
Bruno BELANYI 2022-07-22 18:46:56 +02:00
parent 1a0aa5fddb
commit 2eb7e4c8ef
2 changed files with 4 additions and 0 deletions

View file

@ -19,6 +19,7 @@ impl Bitboard {
pub const ALL: Bitboard = Bitboard(u64::MAX);
/// Array of bitboards representing the eight ranks, in order from rank 1 to rank 8.
#[allow(clippy::unusual_byte_groupings)]
pub const RANKS: [Self; 8] = [
Bitboard(0b00000001_00000001_00000001_00000001_00000001_00000001_00000001_00000001),
Bitboard(0b00000010_00000010_00000010_00000010_00000010_00000010_00000010_00000010),
@ -31,6 +32,7 @@ impl Bitboard {
];
/// Array of bitboards representing the eight files, in order from file A to file H.
#[allow(clippy::unusual_byte_groupings)]
pub const FILES: [Self; 8] = [
Bitboard(0b00000000_00000000_00000000_00000000_00000000_00000000_00000000_11111111),
Bitboard(0b00000000_00000000_00000000_00000000_00000000_00000000_11111111_00000000),

View file

@ -109,6 +109,7 @@ impl std::ops::Shl<usize> for Square {
#[inline(always)]
fn shl(self, rhs: usize) -> Self::Output {
#[allow(clippy::suspicious_arithmetic_impl)]
Square::from_index(self as usize + rhs)
}
}
@ -119,6 +120,7 @@ impl std::ops::Shr<usize> for Square {
#[inline(always)]
fn shr(self, rhs: usize) -> Self::Output {
#[allow(clippy::suspicious_arithmetic_impl)]
Square::from_index(self as usize - rhs)
}
}