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

Function assert_key_none

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

Asserts that the map does not contain `key`.

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

Source from the content-addressed store, hash-verified

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) {
259 assert!(!map.contains_key(&key));
260 assert_eq!(map.get(&key), None);
261 assert_eq!(map.get_mut(&key), None);
262 }
263
264 /// Inserting `key` twice returns the old value.
265 fn insert_returns_old_inner<const N: usize, const M: usize>(key: K, val1: V, val2: V, val3: V) {

Callers 2

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…