Make Func::getN return a Result rather than an Option (#966)
This allows getN to return a detailed explanation of any type signature mismatch, and makes it easy to just use `?` on the result of getN rather than constructing a (necessarily vaguer) error message in the caller.
This commit is contained in:
@@ -38,8 +38,8 @@ impl wasmtime::WasmTy for WasiCallerMemory {
|
||||
|
||||
fn push(_dst: &mut Vec<wasmtime::ValType>) {}
|
||||
|
||||
fn matches(_tys: impl Iterator<Item = wasmtime::ValType>) -> bool {
|
||||
true
|
||||
fn matches(_tys: impl Iterator<Item = wasmtime::ValType>) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn from_abi(vmctx: *mut wasmtime_runtime::VMContext, _abi: ()) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user