From 8ffef00bf88ab7d5c5c0835fc51d3d19a2f78943 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.11 --- Cargo.toml | 5 +++-- src/map.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a056c3c6b5..de709a89ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" [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 } @@ -38,7 +38,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 ab1128879f..ad117a987b 100644 --- a/src/map.rs +++ b/src/map.rs @@ -14,7 +14,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"))]