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

Function compute_hash

cranelift/codegen/src/ctxhash.rs:75–82  ·  view source on GitHub ↗
(ctx: &Ctx, k: &K)

Source from the content-addressed store, hash-verified

73}
74
75fn compute_hash<Ctx, K>(ctx: &Ctx, k: &K) -> u32
76where
77 Ctx: CtxHash<K>,
78{
79 let mut hasher = rustc_hash::FxHasher::default();
80 ctx.ctx_hash(&mut hasher, k);
81 hasher.finish() as u32
82}
83
84impl<K, V> CtxHashMap<K, V> {
85 /// Insert a new key-value pair, returning the old value associated

Callers 3

insertMethod · 0.85
getMethod · 0.85
entryMethod · 0.85

Calls 2

ctx_hashMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected