diff --git a/lib/runtime-core/src/error.rs b/lib/runtime-core/src/error.rs index ec28ef8ad..dc0972d43 100644 --- a/lib/runtime-core/src/error.rs +++ b/lib/runtime-core/src/error.rs @@ -101,7 +101,7 @@ impl PartialEq for RuntimeError { #[derive(Debug, Clone)] pub enum ResolveError { Signature { expected: FuncSig, found: Vec }, - NoSuchExport { name: String }, + ExportNotFound { name: String }, ExportWrongType { name: String }, } diff --git a/lib/runtime-core/src/instance.rs b/lib/runtime-core/src/instance.rs index 7a4983bcd..14e7d0207 100644 --- a/lib/runtime-core/src/instance.rs +++ b/lib/runtime-core/src/instance.rs @@ -90,7 +90,7 @@ impl Instance { self.module .exports .get(name) - .ok_or_else(|| ResolveError::NoSuchExport { + .ok_or_else(|| ResolveError::ExportNotFound { name: name.to_string(), })?; @@ -143,7 +143,7 @@ impl Instance { self.module .exports .get(name) - .ok_or_else(|| ResolveError::NoSuchExport { + .ok_or_else(|| ResolveError::ExportNotFound { name: name.to_string(), })?;