pub mod bounded_lru;
pub mod pass_aged;
pub mod rare;
mod word_hash;
pub use word_hash::WordHasher;
#[cfg(not(target_pointer_width = "32"))]
pub type FixedState = foldhash::fast::FixedState;
#[cfg(target_pointer_width = "32")]
pub type FixedState = std::hash::BuildHasherDefault<WordHasher>;
#[cfg(not(target_pointer_width = "32"))]
const FIXED_STATE: FixedState = foldhash::fast::FixedState::with_seed(0);
#[cfg(target_pointer_width = "32")]
const FIXED_STATE: FixedState = std::hash::BuildHasherDefault::new();
pub type FixedHashMap<K, V> = std::collections::HashMap<K, V, FixedState>;
pub type FixedHashSet<K> = std::collections::HashSet<K, FixedState>;
pub const fn fixed_hash_map<K, V>() -> FixedHashMap<K, V> {
std::collections::HashMap::with_hasher(FIXED_STATE)
}
pub const fn fixed_hash_set<K>() -> FixedHashSet<K> {
std::collections::HashSet::with_hasher(FIXED_STATE)
}
#[cfg(feature = "std-hash")]
pub mod map {
pub use std::collections::{
HashMap, HashSet,
hash_map::{Entry, RandomState},
};
}
#[cfg(all(not(feature = "std-hash"), not(target_pointer_width = "32")))]
pub mod map {
pub use std::collections::hash_map::Entry;
pub use foldhash::{HashMap, HashSet, fast::RandomState};
}
#[cfg(all(not(feature = "std-hash"), target_pointer_width = "32"))]
pub mod map {
pub use std::collections::hash_map::Entry;
pub type RandomState = std::hash::BuildHasherDefault<super::WordHasher>;
pub type HashMap<K, V> = std::collections::HashMap<K, V, RandomState>;
pub type HashSet<K> = std::collections::HashSet<K, RandomState>;
}