diff --git a/Cargo.lock b/Cargo.lock index 6231edb1..ad777c24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4213,6 +4213,7 @@ dependencies = [ "alloy-trie", "auto_impl", "hashbrown 0.15.2", + "rustc-hash", "sled", ] diff --git a/Cargo.toml b/Cargo.toml index d12a235d..5af0f49f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,7 @@ auto_impl = "1.2" hashbrown = "0.15" once_cell = "1.19" rkyv = "0.8" +rustc-hash = "2.0" thiserror = "1.0" tiny-keccak = "2.0" diff --git a/crates/kv/Cargo.toml b/crates/kv/Cargo.toml index 8aced6d5..c2bb0e08 100644 --- a/crates/kv/Cargo.toml +++ b/crates/kv/Cargo.toml @@ -16,6 +16,7 @@ auto_impl.workspace = true alloy-trie = { workspace = true, optional = true } alloy-primitives = { workspace = true, optional = true } hashbrown.workspace = true +rustc-hash = { workspace = true, default-features = false } sled = { workspace = true, optional = true } [features] diff --git a/crates/kv/src/lib.rs b/crates/kv/src/lib.rs index 26f82b64..7569ce44 100644 --- a/crates/kv/src/lib.rs +++ b/crates/kv/src/lib.rs @@ -5,8 +5,11 @@ use std::borrow::{Borrow, Cow}; use std::hash::Hash; mod imps; -pub use hashbrown::{self, HashMap, HashSet}; pub use imps::{nohash, small}; +pub use rustc_hash::{FxBuildHasher, FxHasher}; + +pub type HashMap = hashbrown::HashMap; +pub type HashSet = hashbrown::HashSet; /// Value trait #[auto_impl(&, &mut, Box, Rc, Arc)]