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

Method remove_at

rust/src/node.rs:272–280  ·  view source on GitHub ↗

Remove key and value at specific index.

(&mut self, index: usize)

Source from the content-addressed store, hash-verified

270
271 /// Remove key and value at specific index.
272 pub fn remove_at(&mut self, index: usize) -> Option<(K, V)> {
273 if index < self.keys.len() {
274 let key = self.keys.remove(index);
275 let value = self.values.remove(index);
276 Some((key, value))
277 } else {
278 None
279 }
280 }
281
282 /// Pop the last key-value pair.
283 pub fn pop(&mut self) -> Option<(K, V)> {

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected