diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs index 9fbcef6c22..e040527898 100644 --- a/crates/wasmtime/src/linker.rs +++ b/crates/wasmtime/src/linker.rs @@ -371,7 +371,7 @@ impl Linker { /// "#; /// let module = Module::new(store.engine(), wat)?; /// linker.module("", &module)?; - /// let count = linker.get_one_by_name("", "run")?.into_func().unwrap().get0::()?()?; + /// let count = linker.get_one_by_name("", Some("run"))?.into_func().unwrap().get0::()?()?; /// assert_eq!(count, 0, "a Command should get a fresh instance on each invocation"); /// /// # Ok(()) diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs index b6a41d1791..acc1b75bed 100644 --- a/crates/wasmtime/src/module.rs +++ b/crates/wasmtime/src/module.rs @@ -406,7 +406,7 @@ impl Module { /// assert_eq!(module.imports().len(), 1); /// let import = module.imports().next().unwrap(); /// assert_eq!(import.module(), "host"); - /// assert_eq!(import.name(), "foo"); + /// assert_eq!(import.name(), Some("foo")); /// match import.ty() { /// ExternType::Func(_) => { /* ... */ } /// _ => panic!("unexpected import type!"),