1
0
Fork 0
This commit is contained in:
Paul-Nicolas Madelaine 2025-11-13 23:10:22 +01:00
parent 01253b66de
commit 457e0c5aff
2 changed files with 4 additions and 0 deletions

View file

@ -54,6 +54,7 @@ use std::iter::FusedIterator;
/// The order on [`Position`] is defined only for use in data structures. Hence its only
/// requirement is to be efficient while respecting the [`Ord`] trait protocol. It should not be
/// considered stable.
#[must_use]
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct Position(Setup);
@ -91,6 +92,7 @@ impl Position {
/// position.legal_moves().len()
/// # };
/// ```
#[must_use]
#[inline]
pub fn count_legal_moves(&self) -> usize {
struct MoveGenImpl {