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

Method contains

cranelift/bforest/src/set.rs:95–100  ·  view source on GitHub ↗

Does the set contain `key`?.

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

Source from the content-addressed store, hash-verified

93
94 /// Does the set contain `key`?.
95 pub fn contains<C: Comparator<K>>(&self, key: K, forest: &SetForest<K>, comp: &C) -> bool {
96 self.root
97 .expand()
98 .and_then(|root| Path::default().find(key, root, &forest.nodes, comp))
99 .is_some()
100 }
101
102 /// Try to insert `key` into the set.
103 ///

Callers

nothing calls this directly

Calls 3

is_someMethod · 0.45
expandMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected