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

Function push

cranelift/entity/src/primary.rs:403–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402 #[test]
403 fn push() {
404 let mut m = PrimaryMap::new();
405 let k0: E = m.push(12);
406 let k1 = m.push(33);
407
408 assert_eq!(m[k0], 12);
409 assert_eq!(m[k1], 33);
410
411 let v: Vec<E> = m.keys().collect();
412 assert_eq!(v, [k0, k1]);
413 }
414
415 #[test]
416 fn iter() {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
newFunction · 0.50
pushMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected