MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / clear

Method clear

cranelift/bitset/src/compound.rs:467–478  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

465 /// ```
466 #[inline]
467 pub fn clear(&mut self) {
468 let max = match self.max() {
469 Some(max) => max,
470 None => return,
471 };
472 let (word, _bit) = Self::word_and_bit(max);
473 debug_assert!(self.elems[word + 1..].iter().all(|sub| sub.is_empty()));
474 for sub in &mut self.elems[..=word] {
475 *sub = ScalarBitSet::new();
476 }
477 self.max = None;
478 }
479
480 /// Iterate over the elements in this bitset.
481 ///

Callers

nothing calls this directly

Calls 2

newFunction · 0.50
maxMethod · 0.45

Tested by

no test coverage detected