Remove all useless 'allow(unused)'

This commit is contained in:
Bruno BELANYI 2022-07-24 16:43:18 +02:00
parent 915244b238
commit 02d48fe526
5 changed files with 0 additions and 8 deletions

View file

@ -1,6 +1,5 @@
use crate::board::{Bitboard, Direction, Square};
#[allow(unused)]
pub fn bishop_moves(square: Square, blockers: Bitboard) -> Bitboard {
Direction::iter_bishop()
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))

View file

@ -1,7 +1,6 @@
use crate::board::{Bitboard, CastleRights, Color, Direction, File, Square};
// No castling moves included
#[allow(unused)]
pub fn king_moves(square: Square) -> Bitboard {
let board = square.into_bitboard();
@ -10,7 +9,6 @@ pub fn king_moves(square: Square) -> Bitboard {
.fold(Bitboard::EMPTY, |lhs, rhs| lhs | rhs)
}
#[allow(unused)]
pub fn king_castling_moves(color: Color, castle_rights: CastleRights) -> Bitboard {
let rank = color.first_rank();

View file

@ -1,6 +1,5 @@
use crate::board::{Bitboard, Direction, Square};
#[allow(unused)]
pub fn knight_moves(square: Square) -> Bitboard {
let board = square.into_bitboard();

View file

@ -1,6 +1,5 @@
use crate::board::{Bitboard, Color, Direction, Rank, Square};
#[allow(unused)]
pub fn pawn_moves(color: Color, square: Square, blockers: Bitboard) -> Bitboard {
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
return Bitboard::EMPTY;
@ -22,7 +21,6 @@ pub fn pawn_moves(color: Color, square: Square, blockers: Bitboard) -> Bitboard
}
}
#[allow(unused)]
pub fn pawn_captures(color: Color, square: Square) -> Bitboard {
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
return Bitboard::EMPTY;
@ -38,7 +36,6 @@ pub fn pawn_captures(color: Color, square: Square) -> Bitboard {
attack_west | attack_east
}
#[allow(unused)]
pub fn en_passant_origins(square: Square) -> Bitboard {
let board = square.into_bitboard();

View file

@ -1,6 +1,5 @@
use crate::board::{Bitboard, Direction, Square};
#[allow(unused)]
pub fn rook_moves(square: Square, blockers: Bitboard) -> Bitboard {
Direction::iter_rook()
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))