MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / assert_key_eq

Function assert_key_eq

crates/data-structures/src/small_map.rs:251–255  ·  view source on GitHub ↗

Asserts that the map contains `key` with value `val`.

(map: &mut Map<N, M>, key: K, mut val: V)

Source from the content-addressed store, hash-verified

249
250 /// Asserts that the map contains `key` with value `val`.
251 fn assert_key_eq<const N: usize, const M: usize>(map: &mut Map<N, M>, key: K, mut val: V) {
252 assert!(map.contains_key(&key));
253 assert_eq!(map.get(&key), Some(&val));
254 assert_eq!(map.get_mut(&key), Some(&mut val));
255 }
256
257 /// Asserts that the map does not contain `key`.
258 fn assert_key_none<const N: usize, const M: usize>(map: &mut Map<N, M>, key: K) {

Callers 3

insert_returns_old_innerFunction · 0.85
insert_get_remove_innerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…