[board] Remove explicit #[inline] from several Board methods

Trust the compiler to inline where appropriate, until I know otherwise.
This commit is contained in:
Eryn Wells 2024-07-13 11:54:58 -07:00
parent 7a46d52e8d
commit 26ae79e17d

View file

@ -107,25 +107,21 @@ impl Board {
}
/// A [`BitBoard`] representing the set of squares containing a piece.
#[inline]
#[must_use]
pub fn occupied_squares(&self) -> &BitBoard {
self.pieces.all_pieces()
}
#[inline]
#[must_use]
pub fn friendly_pieces(&self) -> &BitBoard {
self.pieces.all_pieces_of_color(self.player_to_move)
}
#[inline]
#[must_use]
pub fn opposing_pieces(&self) -> &BitBoard {
self.pieces.all_pieces_of_color(self.player_to_move.other())
}
#[inline]
#[must_use]
pub fn all_pieces(&self) -> (&BitBoard, &BitBoard) {
(self.friendly_pieces(), self.opposing_pieces())
@ -133,7 +129,6 @@ impl Board {
/// A [`BitBoard`] representing the set of squares containing a piece. This set is the inverse of
/// `Board::occupied_squares`.
#[inline]
#[must_use]
pub fn empty_squares(&self) -> BitBoard {
!self.occupied_squares()