Normalize the path position such that it is either pointing at a real entry or `size=0` indicating "off-the-end".
(&mut self, pool: &NodePool<F>)
| 647 | /// Normalize the path position such that it is either pointing at a real entry or `size=0` |
| 648 | /// indicating "off-the-end". |
| 649 | pub fn normalize(&mut self, pool: &NodePool<F>) { |
| 650 | if let Some((leaf, entry)) = self.leaf_pos() { |
| 651 | if entry >= pool[leaf].entries() { |
| 652 | let leaf_level = self.size - 1; |
| 653 | self.next_node(leaf_level, pool); |
| 654 | } |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | |
| 659 | #[cfg(test)] |