MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / remove

Method remove

rust/src/node.rs:401–411  ·  view source on GitHub ↗
(&mut self, key: &K)

Source from the content-addressed store, hash-verified

399 /// Returns the removed value if the key existed, and whether the node is now underfull.
400 #[inline]
401 pub fn remove(&mut self, key: &K) -> (Option<V>, bool) {
402 match self.keys.binary_search(key) {
403 Ok(index) => {
404 let removed_value = self.values.remove(index);
405 self.keys.remove(index);
406 let is_underfull = self.is_underfull();
407 (Some(removed_value), is_underfull)
408 }
409 Err(_) => (None, false), // Key not found
410 }
411 }
412
413 // ============================================================================
414 // STATUS CHECKS

Callers 15

setup.pyFile · 0.45
bench_deletionFunction · 0.45
bench_mixed_operationsFunction · 0.45
try_removeMethod · 0.45
batch_insertMethod · 0.45
benchmark_deleteFunction · 0.45
remove_atMethod · 0.45

Calls 1

is_underfullMethod · 0.45