Skip to content

Commit

Permalink
Bump shakmaty from 0.18.0 to 0.19.0
Browse files Browse the repository at this point in the history
Bumps [shakmaty](https://github.com/niklasf/shakmaty) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/niklasf/shakmaty/releases)
- [Commits](niklasf/shakmaty@v0.18.0...v0.19.0)

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and brunocodutra committed Apr 17, 2021
1 parent 8af2db4 commit 6447948
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -16,7 +16,7 @@ clap = "2.33.3"
derive_more = "0.99.11"
futures = "0.3.13"
rustyline = "8.0.0"
shakmaty = "0.18.0"
shakmaty = "0.19.0"
smol = "1.2.5"
structopt = "0.3.21"
tracing = "0.1.25"
Expand Down
12 changes: 2 additions & 10 deletions src/position.rs
Expand Up @@ -11,7 +11,7 @@ use proptest::prelude::*;
/// The current position on the chess board.
///
/// This type guarantees that it only holds valid positions.
#[derive(DebugCustom, Display, Default, Clone /*, Hash*/)]
#[derive(DebugCustom, Display, Default, Clone)]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[debug(fmt = "Position(\"{}\")", self)]
#[display(fmt = "{}", "sm::fen::FenOpts::new().promoted(true).fen(setup)")]
Expand Down Expand Up @@ -103,17 +103,9 @@ impl PartialEq for Position {
}
}

// FIXME: merged upstream
impl Hash for Position {
fn hash<H: Hasher>(&self, state: &mut H) {
let fen = sm::fen::Fen::from_setup(&self.setup);

fen.board.hash(state);
fen.turn.hash(state);
fen.castling_rights.hash(state);
fen.ep_square.hash(state);
fen.halfmoves.hash(state);
fen.fullmoves.hash(state);
sm::fen::Fen::from_setup(&self.setup).hash(state);
}
}

Expand Down

0 comments on commit 6447948

Please sign in to comment.