MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / remove

Method remove

cranelift/bforest/src/path.rs:380–391  ·  view source on GitHub ↗

Remove the key-value pair at the current position and advance the path to the next key-value pair, leaving the path in a normalized state. Return the new root node.

(&mut self, pool: &mut NodePool<F>)

Source from the content-addressed store, hash-verified

378 ///
379 /// Return the new root node.
380 pub fn remove(&mut self, pool: &mut NodePool<F>) -> Option<Node> {
381 let e = self.leaf_entry();
382 match pool[self.leaf_node()].leaf_remove(e) {
383 Removed::Healthy => {
384 if e == 0 {
385 self.update_crit_key(pool)
386 }
387 Some(self.node[0])
388 }
389 status => self.balance_nodes(status, pool),
390 }
391 }
392
393 /// Get the critical key for the current node at `level`.
394 ///

Callers

nothing calls this directly

Calls 5

leaf_entryMethod · 0.80
leaf_removeMethod · 0.80
leaf_nodeMethod · 0.80
update_crit_keyMethod · 0.80
balance_nodesMethod · 0.80

Tested by

no test coverage detected