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

Method remove

cranelift/bforest/src/set.rs:129–142  ·  view source on GitHub ↗

Remove `key` from the set and return true. If `key` was not present in the set, return false.

(
        &mut self,
        key: K,
        forest: &mut SetForest<K>,
        comp: &C,
    )

Source from the content-addressed store, hash-verified

127 ///
128 /// If `key` was not present in the set, return false.
129 pub fn remove<C: Comparator<K>>(
130 &mut self,
131 key: K,
132 forest: &mut SetForest<K>,
133 comp: &C,
134 ) -> bool {
135 let mut c = self.cursor(forest, comp);
136 if c.goto(key) {
137 c.remove();
138 true
139 } else {
140 false
141 }
142 }
143
144 /// Remove all entries.
145 pub fn clear(&mut self, forest: &mut SetForest<K>) {

Callers 2

retainMethod · 0.45
four_levelFunction · 0.45

Calls 4

cursorMethod · 0.45
gotoMethod · 0.45
elemMethod · 0.45
is_someMethod · 0.45

Tested by 1

four_levelFunction · 0.36