From 8ce4cac5acd71da90938b8f2c8510e8d695606be Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 8 Feb 2024 11:14:48 -0800 Subject: [PATCH] Backport #357 for 0.12 --- Cargo.toml | 5 +++-- src/map.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7c1625ed5..a4d5fed5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ rust-version = "1.56.0" [dependencies] # For the default hasher -ahash = { version = "0.7.0", default-features = false, optional = true } +ahash = { version = "0.8.0", default-features = false, optional = true } # For external trait impls rayon = { version = "1.0", optional = true } @@ -39,7 +39,8 @@ doc-comment = "0.3.1" [features] default = ["ahash", "inline-more"] -ahash-compile-time-rng = ["ahash/compile-time-rng"] +# Ahash changed behavior here, this feature is now a no-op for backcompat +ahash-compile-time-rng = [] nightly = [] rustc-internal-api = [] rustc-dep-of-std = [ diff --git a/src/map.rs b/src/map.rs index a5d3ccb97..3ec640ba5 100644 --- a/src/map.rs +++ b/src/map.rs @@ -10,7 +10,7 @@ use core::ops::Index; /// Default hasher for `HashMap`. #[cfg(feature = "ahash")] -pub type DefaultHashBuilder = ahash::RandomState; +pub type DefaultHashBuilder = core::hash::BuildHasherDefault; /// Dummy default hasher for `HashMap`. #[cfg(not(feature = "ahash"))]