Remove all useless 'allow(unused)'
This commit is contained in:
parent
915244b238
commit
02d48fe526
|
@ -1,6 +1,5 @@
|
||||||
use crate::board::{Bitboard, Direction, Square};
|
use crate::board::{Bitboard, Direction, Square};
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn bishop_moves(square: Square, blockers: Bitboard) -> Bitboard {
|
pub fn bishop_moves(square: Square, blockers: Bitboard) -> Bitboard {
|
||||||
Direction::iter_bishop()
|
Direction::iter_bishop()
|
||||||
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))
|
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::board::{Bitboard, CastleRights, Color, Direction, File, Square};
|
use crate::board::{Bitboard, CastleRights, Color, Direction, File, Square};
|
||||||
|
|
||||||
// No castling moves included
|
// No castling moves included
|
||||||
#[allow(unused)]
|
|
||||||
pub fn king_moves(square: Square) -> Bitboard {
|
pub fn king_moves(square: Square) -> Bitboard {
|
||||||
let board = square.into_bitboard();
|
let board = square.into_bitboard();
|
||||||
|
|
||||||
|
@ -10,7 +9,6 @@ pub fn king_moves(square: Square) -> Bitboard {
|
||||||
.fold(Bitboard::EMPTY, |lhs, rhs| lhs | rhs)
|
.fold(Bitboard::EMPTY, |lhs, rhs| lhs | rhs)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn king_castling_moves(color: Color, castle_rights: CastleRights) -> Bitboard {
|
pub fn king_castling_moves(color: Color, castle_rights: CastleRights) -> Bitboard {
|
||||||
let rank = color.first_rank();
|
let rank = color.first_rank();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use crate::board::{Bitboard, Direction, Square};
|
use crate::board::{Bitboard, Direction, Square};
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn knight_moves(square: Square) -> Bitboard {
|
pub fn knight_moves(square: Square) -> Bitboard {
|
||||||
let board = square.into_bitboard();
|
let board = square.into_bitboard();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use crate::board::{Bitboard, Color, Direction, Rank, Square};
|
use crate::board::{Bitboard, Color, Direction, Rank, Square};
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn pawn_moves(color: Color, square: Square, blockers: Bitboard) -> Bitboard {
|
pub fn pawn_moves(color: Color, square: Square, blockers: Bitboard) -> Bitboard {
|
||||||
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
|
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
|
||||||
return Bitboard::EMPTY;
|
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 {
|
pub fn pawn_captures(color: Color, square: Square) -> Bitboard {
|
||||||
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
|
if (square.rank() == Rank::First) || (square.rank() == Rank::Eighth) {
|
||||||
return Bitboard::EMPTY;
|
return Bitboard::EMPTY;
|
||||||
|
@ -38,7 +36,6 @@ pub fn pawn_captures(color: Color, square: Square) -> Bitboard {
|
||||||
attack_west | attack_east
|
attack_west | attack_east
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn en_passant_origins(square: Square) -> Bitboard {
|
pub fn en_passant_origins(square: Square) -> Bitboard {
|
||||||
let board = square.into_bitboard();
|
let board = square.into_bitboard();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use crate::board::{Bitboard, Direction, Square};
|
use crate::board::{Bitboard, Direction, Square};
|
||||||
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn rook_moves(square: Square, blockers: Bitboard) -> Bitboard {
|
pub fn rook_moves(square: Square, blockers: Bitboard) -> Bitboard {
|
||||||
Direction::iter_rook()
|
Direction::iter_rook()
|
||||||
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))
|
.map(|dir| dir.slide_board_with_blockers(square.into_bitboard(), blockers))
|
||||||
|
|
Loading…
Reference in a new issue