Skip to content

Commit e877f33

Browse files
committed
replace find.is_some with any
1 parent 02b4e89 commit e877f33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/board.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ impl Board {
851851
/// ```
852852
#[inline]
853853
pub fn legal(&self, m: ChessMove) -> bool {
854-
MoveGen::new_legal(&self).find(|x| *x == m).is_some()
854+
MoveGen::new_legal(&self).any(|x| x == m)
855855
}
856856

857857
/// Make a chess move onto a new board.

0 commit comments

Comments
 (0)