(&self, key: &K)
| 619 | /// Find the index of the child that should contain the given key. |
| 620 | #[inline] |
| 621 | pub fn find_child_index(&self, key: &K) -> usize { |
| 622 | // Binary search to find the appropriate child |
| 623 | match self.keys.binary_search(key) { |
| 624 | Ok(index) => index + 1, // Key found, go to right child |
| 625 | Err(index) => index, // Key not found, index is the insertion point |
| 626 | } |
| 627 | } |
| 628 | |
| 629 | /// Returns the number of keys in this branch node. |
| 630 | pub fn len(&self) -> usize { |
no outgoing calls
no test coverage detected