use core::hash::BuildHasherDefault;
use std::collections::hash_map::RandomState;
use std::collections::{HashMap, HashSet};
use crate::{Passthru, Prehashed};
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
pub type DefaultPrehasher = RandomState;
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
pub type PrehashedSet<T> = HashSet<Prehashed<T, u64>, BuildHasherDefault<Passthru>>;
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
#[must_use]
pub fn new_prehashed_set<T>() -> PrehashedSet<T> {
PrehashedSet::with_hasher(Default::default())
}
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
#[must_use]
pub fn new_prehashed_set_with_capacity<T>(capacity: usize) -> PrehashedSet<T> {
PrehashedSet::with_capacity_and_hasher(capacity, Default::default())
}
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
pub type PrehashedMap<K, V> = HashMap<Prehashed<K, u64>, V, BuildHasherDefault<Passthru>>;
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
#[must_use]
pub fn new_prehashed_map<K, V>() -> PrehashedMap<K, V> {
PrehashedMap::with_hasher(Default::default())
}
#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))]
#[must_use]
pub fn new_prehashed_map_with_capacity<K, V>(capacity: usize) -> PrehashedMap<K, V> {
PrehashedMap::with_capacity_and_hasher(capacity, Default::default())
}