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

Method tpath

cranelift/bforest/src/map.rs:300–310  ·  view source on GitHub ↗

Get a text version of the path to `key`.

(&self, key: K, forest: &MapForest<K, V>, comp: &C)

Source from the content-addressed store, hash-verified

298
299 /// Get a text version of the path to `key`.
300 fn tpath<C: Comparator<K>>(&self, key: K, forest: &MapForest<K, V>, comp: &C) -> String {
301 use alloc::string::ToString;
302 match self.root.expand() {
303 None => "map(empty)".to_string(),
304 Some(root) => {
305 let mut path = Path::default();
306 path.find(key, root, &forest.nodes, comp);
307 path.to_string()
308 }
309 }
310 }
311}
312
313struct MapCursorRaw<K, V>

Callers

nothing calls this directly

Calls 3

expandMethod · 0.45
to_stringMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected