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

Method goto

cranelift/bforest/src/map.rs:366–380  ·  view source on GitHub ↗
(
        &mut self,
        root: &PackedOption<Node>,
        pool: &NodePool<MapTypes<K, V>>,
        elem: K,
        comp: &impl Comparator<K>,
    )

Source from the content-addressed store, hash-verified

364 }
365
366 fn goto(
367 &mut self,
368 root: &PackedOption<Node>,
369 pool: &NodePool<MapTypes<K, V>>,
370 elem: K,
371 comp: &impl Comparator<K>,
372 ) -> Option<V> {
373 root.expand().and_then(|root| {
374 let v = self.path.find(elem, root, pool, comp);
375 if v.is_none() {
376 self.path.normalize(pool);
377 }
378 v
379 })
380 }
381
382 fn goto_first(
383 &mut self,

Callers 4

removeMethod · 0.45
nextMethod · 0.45
next_backMethod · 0.45
immutable_cursorFunction · 0.45

Calls 4

normalizeMethod · 0.80
expandMethod · 0.45
findMethod · 0.45
is_noneMethod · 0.45

Tested by 1

immutable_cursorFunction · 0.36