(&mut self, i: usize)
| 365 | /// ``` |
| 366 | #[inline] |
| 367 | pub fn remove(&mut self, i: usize) -> bool { |
| 368 | let (word, bit) = Self::word_and_bit(i); |
| 369 | if word < self.elems.len() { |
| 370 | let sub = &mut self.elems[word]; |
| 371 | let was_present = sub.remove(bit); |
| 372 | if was_present && self.max() == Some(i) { |
| 373 | self.update_max(word); |
| 374 | } |
| 375 | was_present |
| 376 | } else { |
| 377 | false |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | /// Update the `self.max` field, based on the old word index of `self.max`. |
| 382 | fn update_max(&mut self, word_of_old_max: usize) { |
no test coverage detected