Remove pinned VRegs. (#108)
This commit is contained in:
@@ -140,6 +140,13 @@ impl AdaptiveMap {
|
||||
&Self::Large(ref map) => AdaptiveMapIter::Large(map.iter()),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
match self {
|
||||
AdaptiveMap::Small { values, .. } => values.iter().all(|&value| value == 0),
|
||||
AdaptiveMap::Large(m) => m.values().all(|&value| value == 0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum AdaptiveMapIter<'a> {
|
||||
@@ -268,6 +275,11 @@ impl IndexSet {
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Is the set empty?
|
||||
pub(crate) fn is_empty(&self) -> bool {
|
||||
self.elems.is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SetBitsIter(u64);
|
||||
|
||||
Reference in New Issue
Block a user