From 2eb7e4c8ef30a49418b58c3f9abab516c3402e57 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Jul 2022 18:46:56 +0200 Subject: [PATCH] Allow some clippy warnings --- src/board/bitboard/mod.rs | 2 ++ src/board/square.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/board/bitboard/mod.rs b/src/board/bitboard/mod.rs index 91c3122..d5ca8eb 100644 --- a/src/board/bitboard/mod.rs +++ b/src/board/bitboard/mod.rs @@ -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), diff --git a/src/board/square.rs b/src/board/square.rs index 0d58c2b..97d9bdc 100644 --- a/src/board/square.rs +++ b/src/board/square.rs @@ -109,6 +109,7 @@ impl std::ops::Shl 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 for Square { #[inline(always)] fn shr(self, rhs: usize) -> Self::Output { + #[allow(clippy::suspicious_arithmetic_impl)] Square::from_index(self as usize - rhs) } }