(&mut self)
| 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 | /// |