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

Function to_hashmap

crates/client-api/src/auth.rs:312–318  ·  view source on GitHub ↗
(value: serde_json::Value)

Source from the content-addressed store, hash-verified

310 }
311
312 fn to_hashmap(value: serde_json::Value) -> HashMap<Box<str>, serde_json::Value> {
313 let mut map = HashMap::new();
314 value.as_object().unwrap().iter().for_each(|(k, v)| {
315 map.insert(k.clone().into(), v.clone());
316 });
317 map
318 }
319
320 // Make sure that when we encode TokenClaims, we can decode the extra claims.
321 #[tokio::test]

Calls 5

iterMethod · 0.65
insertMethod · 0.65
newFunction · 0.50
unwrapMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…