pub mod bfuse;
#[doc(hidden)]
#[macro_export]
macro_rules! make_fp_block(
($size:expr, $ty:ty) => {
{
#[cfg(feature = "uniform-random")] {
let mut seed = 0x12345678u64;
core::iter::repeat_with(|| {
seed = seed.wrapping_add(1);
<$ty as $crate::hash::Fingerprint>::from_hash($crate::hash::mix64(seed))
})
.take($size as usize)
.collect::<Box<[_]>>()
}
#[cfg(not(feature = "uniform-random"))] {
vec![<$ty>::default(); $size as usize].into_boxed_slice()
}
}
}
);
#[cfg(debug_assertions)]
pub fn all_distinct(keys: impl IntoIterator<Item = u64>) -> bool {
let mut s = alloc::collections::BTreeSet::new();
keys.into_iter().all(move |x| s.insert(x))
}