diff --git a/Cargo.lock b/Cargo.lock index b25ddf8..1edfd1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,13 +4,14 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ - "getrandom", + "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -840,3 +841,23 @@ name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index b8a4d45..d8aad00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ serde = {version = "1.0.105", optional = true} seize = "0.2.1" [dependencies.ahash] -version = "0.7.6" +version = "0.8" default-features = false # for minimal-versions diff --git a/src/lib.rs b/src/lib.rs index 6cf8711..e3d8b38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -258,12 +258,15 @@ mod serde_impls; /// Iterator types. pub mod iter; +use std::hash::BuildHasherDefault; + +use ahash::AHasher; pub use map::{HashMap, TryInsertError}; pub use map_ref::HashMapRef; pub use set::HashSet; pub use set_ref::HashSetRef; /// Default hasher for [`HashMap`]. -pub type DefaultHashBuilder = ahash::RandomState; +pub type DefaultHashBuilder = BuildHasherDefault; pub use seize::Guard;