Borrow the last key-value pair from this leaf (used when this is the left sibling)
(&mut self)
| 460 | |
| 461 | /// Borrow the last key-value pair from this leaf (used when this is the left sibling) |
| 462 | pub fn borrow_last(&mut self) -> Option<(K, V)> { |
| 463 | if self.keys.is_empty() || !self.can_donate() { |
| 464 | return None; |
| 465 | } |
| 466 | Some((self.keys.pop().unwrap(), self.values.pop().unwrap())) |
| 467 | } |
| 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)> { |
no test coverage detected