mirror of
https://github.com/mii443/wasmer.git
synced 2025-09-01 15:09:17 +00:00
feat(c-api) Simplify code with unwrap_or_default
.
This commit is contained in:
@ -150,7 +150,7 @@ pub unsafe extern "C" fn wasm_func_call(
|
|||||||
.collect::<Result<Vec<Val>, _>>()
|
.collect::<Result<Vec<Val>, _>>()
|
||||||
.expect("Argument conversion failed")
|
.expect("Argument conversion failed")
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| Vec::new());
|
.unwrap_or_default();
|
||||||
|
|
||||||
match func.inner.call(¶ms) {
|
match func.inner.call(¶ms) {
|
||||||
Ok(wasm_results) => {
|
Ok(wasm_results) => {
|
||||||
|
Reference in New Issue
Block a user