feat(c-api) Simplify code with unwrap_or_default.

This commit is contained in:
Ivan Enderlin
2020-10-16 10:17:23 +02:00
parent 44632946c1
commit e29ea25dcd

View File

@ -150,7 +150,7 @@ pub unsafe extern "C" fn wasm_func_call(
.collect::<Result<Vec<Val>, _>>()
.expect("Argument conversion failed")
})
.unwrap_or_else(|| Vec::new());
.unwrap_or_default();
match func.inner.call(&params) {
Ok(wasm_results) => {