This commit is contained in:
Loïc Lecrenier
2023-03-18 15:04:34 +01:00
parent 2853009987
commit 8b4e07e1a3
14 changed files with 367 additions and 284 deletions

View File

@ -28,6 +28,12 @@ impl<T> SmallBitmap<T> {
}
}
}
pub fn universe_length(&self) -> u16 {
match &self.internal {
SmallBitmapInternal::Tiny(_) => 64,
SmallBitmapInternal::Small(xs) => 64 * xs.len() as u16,
}
}
pub fn from_iter(
xs: impl Iterator<Item = Interned<T>>,
for_interner: &FixedSizeInterner<T>,