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

Function set

cranelift/codegen/src/ir/constant.rs:329–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

327
328 #[test]
329 fn set() {
330 let mut sut = ConstantPool::new();
331 let handle = Constant::with_number(42).unwrap();
332 let data = vec![1, 2, 3];
333 sut.set(handle, data.clone().into());
334 assert_eq!(sut.get(handle), &data.into());
335 }
336
337 #[test]
338 #[should_panic]

Callers 1

mergeMethod · 0.50

Calls 4

newFunction · 0.50
unwrapMethod · 0.45
setMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected