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:
parent
2e410ba104
commit
eefa707c07
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -84,6 +84,7 @@ mod shift {
|
|||
|
||||
impl Move {
|
||||
/// Construct a new move.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[inline(always)]
|
||||
fn new(
|
||||
piece: Piece,
|
||||
|
|
Loading…
Reference in a new issue