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

Function from_vec

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

Source from the content-addressed store, hash-verified

561
562 #[test]
563 fn from_vec() {
564 let mut m: PrimaryMap<E, usize> = PrimaryMap::new();
565 m.push(12);
566 m.push(33);
567
568 let n = PrimaryMap::<E, &usize>::from(m.values().collect::<Vec<_>>());
569 assert!(m.len() == n.len());
570 for (me, ne) in m.values().zip(n.values()) {
571 assert!(*me == **ne);
572 }
573 }
574
575 #[test]
576 fn get_many_mut() {

Callers

nothing calls this directly

Calls 4

fromFunction · 0.85
newFunction · 0.50
pushMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected