From 64479485041e7bde8d4b203f71a1057e046c0c11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Apr 2021 05:04:20 +0000 Subject: [PATCH] Bump shakmaty from 0.18.0 to 0.19.0 Bumps [shakmaty](https://github.com/niklasf/shakmaty) from 0.18.0 to 0.19.0. - [Release notes](https://github.com/niklasf/shakmaty/releases) - [Commits](https://github.com/niklasf/shakmaty/compare/v0.18.0...v0.19.0) Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/position.rs | 12 ++---------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3693f1b8..abb98930 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,9 +35,9 @@ checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" [[package]] name = "arrayvec" -version = "0.5.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "5a2f58b0bb10c380af2b26e57212856b8c9a59e0925b4c20f4a174a49734eaf7" [[package]] name = "async-channel" @@ -1219,9 +1219,9 @@ dependencies = [ [[package]] name = "shakmaty" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f580db5b2b7aa5903b997ef6309c461dd30015f0b61e748a8082f84f245889a7" +checksum = "5d2f76c665c10e915a3371689a668796f9fe1f93b47a6dd1955e0ebe91477f51" dependencies = [ "arrayvec", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index 051874c7..eac88f19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/position.rs b/src/position.rs index 81606879..f0af6de5 100644 --- a/src/position.rs +++ b/src/position.rs @@ -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)")] @@ -103,17 +103,9 @@ impl PartialEq for Position { } } -// FIXME: merged upstream impl Hash for Position { fn hash(&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); } }