After removing an entry from the node at `level`, check its health and rebalance as needed. Leave the path up to and including `level` in a normalized state where all entries are in bounds. Returns true if the tree becomes empty.
(&mut self, status: Removed, level: usize, pool: &mut NodePool<F>)
| 485 | /// |
| 486 | /// Returns true if the tree becomes empty. |
| 487 | fn heal_level(&mut self, status: Removed, level: usize, pool: &mut NodePool<F>) -> bool { |
| 488 | match status { |
| 489 | Removed::Healthy => {} |
| 490 | Removed::Rightmost => { |
| 491 | // The rightmost entry was removed from the current node, so move the path so it |
| 492 | // points at the first entry of the next node at this level. |
| 493 | debug_assert_eq!( |
| 494 | usize::from(self.entry[level]), |
| 495 | pool[self.node[level]].entries() |
| 496 | ); |
| 497 | self.next_node(level, pool); |
| 498 | } |
| 499 | Removed::Underflow => self.underflowed_node(level, pool), |
| 500 | Removed::Empty => return self.empty_node(level, pool), |
| 501 | } |
| 502 | false |
| 503 | } |
| 504 | |
| 505 | /// The current node at `level` has underflowed, meaning that it is below half capacity but |
| 506 | /// not completely empty. |
no test coverage detected