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

Method goto

cranelift/bforest/src/set.rs:265–277  ·  view source on GitHub ↗

Move this cursor to `elem`. If `elem` is in the set, place the cursor at `elem` and return true. If `elem` is not in the set, place the cursor at the next larger element (or the end) and return false.

(&mut self, elem: K)

Source from the content-addressed store, hash-verified

263 /// If `elem` is not in the set, place the cursor at the next larger element (or the end) and
264 /// return false.
265 pub fn goto(&mut self, elem: K) -> bool {
266 match self.root.expand() {
267 None => false,
268 Some(root) => {
269 if self.path.find(elem, root, self.pool, self.comp).is_some() {
270 true
271 } else {
272 self.path.normalize(self.pool);
273 false
274 }
275 }
276 }
277 }
278
279 /// Move this cursor to the first element.
280 pub fn goto_first(&mut self) -> Option<K> {

Callers 3

removeMethod · 0.45
four_levelFunction · 0.45
entryMethod · 0.45

Calls 4

normalizeMethod · 0.80
expandMethod · 0.45
is_someMethod · 0.45
findMethod · 0.45

Tested by 1

four_levelFunction · 0.36