Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytecodealliance/wasmtime
/ add_to_constant_data
Function
add_to_constant_data
cranelift/codegen/src/ir/constant.rs:383–387 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
381
382
#[test]
383
fn add_to_constant_data() {
384
let d = ConstantData::from([1, 2].as_ref());
385
let e = d.append(i16::from(3u8));
386
assert_eq!(e.into_vec(), vec![1, 2, 3, 0])
387
}
388
389
#[test]
390
fn extend_constant_data() {
Callers
nothing calls this directly
Calls
3
from
Function · 0.85
as_ref
Method · 0.45
append
Method · 0.45
Tested by
no test coverage detected