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].
|
/// Add some [CastleRights], and return the resulting [CastleRights].
|
||||||
|
#[allow(clippy::should_implement_trait)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn add(self, to_remove: CastleRights) -> Self {
|
pub fn add(self, to_remove: CastleRights) -> Self {
|
||||||
// SAFETY: we know the value is in-bounds
|
// SAFETY: we know the value is in-bounds
|
||||||
|
|
|
@ -190,6 +190,7 @@ impl ChessBoard {
|
||||||
fn is_valid(&self) -> bool {
|
fn is_valid(&self) -> bool {
|
||||||
// Don't overlap pieces.
|
// Don't overlap pieces.
|
||||||
for piece in Piece::iter() {
|
for piece in Piece::iter() {
|
||||||
|
#[allow(clippy::collapsible_if)]
|
||||||
for other in Piece::iter() {
|
for other in Piece::iter() {
|
||||||
if piece != other {
|
if piece != other {
|
||||||
if !(self.piece_occupancy(piece) & self.piece_occupancy(other)).is_empty() {
|
if !(self.piece_occupancy(piece) & self.piece_occupancy(other)).is_empty() {
|
||||||
|
|
|
@ -84,6 +84,7 @@ mod shift {
|
||||||
|
|
||||||
impl Move {
|
impl Move {
|
||||||
/// Construct a new move.
|
/// Construct a new move.
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn new(
|
fn new(
|
||||||
piece: Piece,
|
piece: Piece,
|
||||||
|
|
Loading…
Reference in a new issue