pub(crate) mod macros;
pub(crate) mod prime_key;
pub type TypeIdMap<V> =
std::collections::HashMap<std::any::TypeId, V, std::hash::BuildHasherDefault<NoOpTypeIdHasher>>;
#[doc(hidden)]
#[derive(Default)]
pub struct NoOpTypeIdHasher(u64);
impl std::hash::Hasher for NoOpTypeIdHasher {
fn finish(&self) -> u64 {
self.0
}
fn write(&mut self, bytes: &[u8]) {
self.0 = bytes.iter().fold(self.0, |hash, b| {
hash.rotate_left(8).wrapping_add(*b as u64)
});
}
fn write_u64(&mut self, i: u64) {
self.0 = i;
}
}