#[cfg(feature = "ahash")]
pub(crate) use ahash::RandomState;
#[cfg(all(not(feature = "ahash"), feature = "std"))]
pub(crate) use std::collections::hash_map::RandomState;
#[cfg(not(any(feature = "ahash", feature = "std")))]
compile_error!("weak-table: no_std requires that you enable the `ahash` feature.");
#[cfg(feature = "std")]
mod lib {
extern crate std;
pub(crate) use std::*;
}
#[cfg(not(feature = "std"))]
mod lib {
extern crate alloc;
pub(crate) use alloc::*;
}
pub(crate) use lib::{boxed::Box, rc, sync, vec};
#[cfg(test)]
pub(crate) use lib::{string::String, vec::Vec};
pub(crate) use core::{
alloc::Layout,
borrow::Borrow,
fmt::{self, Debug, Display, Formatter},
hash::{BuildHasher, Hash, Hasher},
iter::{self, FromIterator},
marker::PhantomData,
mem,
ops::{self, Deref, Index, IndexMut},
};
#[cfg(feature = "std")]
pub(crate) use std::error::Error;
#[cfg(test)]
extern crate std;
#[cfg(test)]
pub(crate) use std::{eprintln, format, string::ToString};
#[cfg(test)]
pub(crate) type HashMap<K, V> = hashbrown::HashMap<K, V, RandomState>;
#[cfg(test)]
pub(crate) type HashSet<K> = hashbrown::HashSet<K, RandomState>;