MCPcopy Create free account
hub / github.com/carllerche/assert-struct / get

Method get

assert-struct/tests/maps.rs:267–276  ·  view source on GitHub ↗
(&self, key: &Q)

Source from the content-addressed store, hash-verified

265 }
266
267 fn get<Q>(&self, key: &Q) -> Option<&V>
268 where
269 K: std::borrow::Borrow<Q>,
270 Q: Eq + ?Sized,
271 {
272 self.entries
273 .iter()
274 .find(|(k, _)| k.borrow() == key)
275 .map(|(_, v)| v)
276 }
277}
278
279#[derive(Debug)]

Callers 3

next_node_idFunction · 0.80
cached_sourceFunction · 0.80
fmtMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected