Borrow the first key-value pair from this leaf (used when this is the right sibling)
(&mut self)
| 468 | |
| 469 | /// Borrow the first key-value pair from this leaf (used when this is the right sibling) |
| 470 | pub fn borrow_first(&mut self) -> Option<(K, V)> { |
| 471 | if self.keys.is_empty() || !self.can_donate() { |
| 472 | return None; |
| 473 | } |
| 474 | Some((self.keys.remove(0), self.values.remove(0))) |
| 475 | } |
| 476 | |
| 477 | /// Accept a borrowed key-value pair at the beginning (from left sibling) |
| 478 | pub fn accept_from_left(&mut self, key: K, value: V) { |
no test coverage detected