diff --git a/src/fen.rs b/src/fen.rs index e0de06c2..2f80f44c 100644 --- a/src/fen.rs +++ b/src/fen.rs @@ -358,7 +358,7 @@ impl fmt::Display for Board { } /// A parsed FEN. -#[derive(Clone, Eq, PartialEq, Debug)] +#[derive(Clone, Eq, PartialEq, Hash, Debug)] pub struct Fen { pub board: Board, pub pockets: Option, diff --git a/src/position.rs b/src/position.rs index 69ebc715..ac9c96b3 100644 --- a/src/position.rs +++ b/src/position.rs @@ -32,7 +32,7 @@ use crate::setup::{Castles, EpSquare, Setup, SwapTurn}; use crate::movelist::MoveList; /// Outcome of a game. -#[derive(Copy, Clone, Eq, PartialEq, Debug)] +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub enum Outcome { Decisive { winner: Color }, Draw, diff --git a/src/types.rs b/src/types.rs index 2177a04d..12f33285 100644 --- a/src/types.rs +++ b/src/types.rs @@ -204,7 +204,7 @@ impl Piece { } /// Information about a move. -#[derive(Clone, Eq, PartialEq, Debug)] +#[derive(Clone, Eq, PartialEq, Hash, Debug)] #[repr(align(4))] pub enum Move { Normal {