cfg_if::cfg_if! {
if #[cfg(feature = "ahash")] {
pub(crate) use ahash::RandomState;
} else if #[cfg(feature = "std")] {
pub(crate) use std::collections::hash_map::RandomState;
} else if #[cfg(test)] {
pub(crate) use ahash::RandomState;
}
}
#[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>;