Tweak the API of the Val type (#679)
* Tweak the API of the `Val` type A few updates to the API of the `Val` type: * Added a payload for `V128`. * Replace existing accessor methods with `Option`-returning versions. * Add `unwrap_xxx` family of methods to extract a value and panic. * Remove `Into` conversions which panic, since panicking in `From` or `Into` isn't idiomatic in Rust * Add documentation to all methods/values/enums/etc. * Rename `Val::default` to `Val::null` * Run rustfmt * Review comments
This commit is contained in:
@@ -80,7 +80,7 @@ unsafe extern "C" fn stub_fn(vmctx: *mut VMContext, call_id: u32, values_vec: *m
|
||||
(args, signature.returns.len())
|
||||
};
|
||||
|
||||
let mut returns = vec![Val::default(); returns_len];
|
||||
let mut returns = vec![Val::null(); returns_len];
|
||||
let func = &instance
|
||||
.host_state()
|
||||
.downcast_mut::<TrampolineState>()
|
||||
|
||||
Reference in New Issue
Block a user