|
@@ -44,7 +44,7 @@ impl Iterator for BitboardIterator {
|
|
fn next(&mut self) -> Option<Bitboard> {
|
|
fn next(&mut self) -> Option<Bitboard> {
|
|
if self.board != 0 {
|
|
if self.board != 0 {
|
|
let lsb = self.board & (0_u64.wrapping_sub(self.board));
|
|
let lsb = self.board & (0_u64.wrapping_sub(self.board));
|
|
- self.board &= !lsb;
|
|
|
|
|
|
+ self.board ^= lsb;
|
|
//Some(lsb.trailing_zeros())
|
|
//Some(lsb.trailing_zeros())
|
|
Some(lsb)
|
|
Some(lsb)
|
|
} else {
|
|
} else {
|