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

Method remove_first

rust/src/node.rs:292–300  ·  view source on GitHub ↗

Remove and return the first key-value pair.

(&mut self)

Source from the content-addressed store, hash-verified

290
291 /// Remove and return the first key-value pair.
292 pub fn remove_first(&mut self) -> Option<(K, V)> {
293 if !self.keys.is_empty() {
294 let key = self.keys.remove(0);
295 let value = self.values.remove(0);
296 Some((key, value))
297 } else {
298 None
299 }
300 }
301
302 // ============================================================================
303 // INSERT OPERATIONS

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected