[board] Inline BitAnd, BitOr, and Not BitBoard methods; remove an unused import
This commit is contained in:
parent
0838f4fd01
commit
70d8034e4e
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
use crate::square::Square;
|
||||
use std::arch::asm;
|
||||
use std::ops::{BitAnd, BitOr, Not};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
|
@ -50,6 +49,7 @@ impl BitBoard {
|
|||
impl BitAnd for BitBoard {
|
||||
type Output = BitBoard;
|
||||
|
||||
#[inline]
|
||||
fn bitand(self, rhs: Self) -> Self {
|
||||
BitBoard(self.0 & rhs.0)
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ impl BitAnd for BitBoard {
|
|||
impl BitAnd<&BitBoard> for BitBoard {
|
||||
type Output = BitBoard;
|
||||
|
||||
#[inline]
|
||||
fn bitand(self, rhs: &Self) -> Self {
|
||||
BitBoard(self.0 & rhs.0)
|
||||
}
|
||||
|
@ -93,6 +94,7 @@ impl BitOr for BitBoard {
|
|||
impl BitOr<&BitBoard> for BitBoard {
|
||||
type Output = BitBoard;
|
||||
|
||||
#[inline]
|
||||
fn bitor(self, rhs: &Self) -> Self {
|
||||
BitBoard(self.0 | rhs.0)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue