#[cfg(not(fuzzing))]
mod linked_slab;
#[cfg(fuzzing)]
pub mod linked_slab;
mod shard;
pub mod sync;
pub mod unsync;
#[cfg(feature = "ahash")]
type DefaultHashBuilder = ahash::RandomState;
#[cfg(not(feature = "ahash"))]
type DefaultHashBuilder = std::collections::hash_map::RandomState;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_new() {
sync::VersionedCache::<u64, u64, u64>::new(0, 0);
sync::VersionedCache::<u64, u64, u64>::new(0, 1);
sync::VersionedCache::<u64, u64, u64>::new(0, 2);
sync::VersionedCache::<u64, u64, u64>::new(0, 3);
sync::VersionedCache::<u64, u64, u64>::new(0, usize::MAX);
sync::Cache::<u64, u64>::new(0, 0);
sync::Cache::<u64, u64>::new(0, 1);
sync::Cache::<u64, u64>::new(0, 2);
sync::Cache::<u64, u64>::new(0, 3);
sync::Cache::<u64, u64>::new(0, usize::MAX);
}
#[test]
fn test_borrow_keys() {
let cache = sync::VersionedCache::<Vec<u8>, Vec<u8>, u64>::new(0, 0);
cache.get(&b""[..], &b""[..]);
let cache = sync::VersionedCache::<String, String, u64>::new(0, 0);
cache.get("", "");
}
}