Fix doctests

This commit is contained in:
Alex Crichton
2020-11-24 07:07:08 -08:00
parent 62be6841e4
commit ba141ec6be
2 changed files with 2 additions and 2 deletions

View File

@@ -371,7 +371,7 @@ impl Linker {
/// "#; /// "#;
/// let module = Module::new(store.engine(), wat)?; /// let module = Module::new(store.engine(), wat)?;
/// linker.module("", &module)?; /// linker.module("", &module)?;
/// let count = linker.get_one_by_name("", "run")?.into_func().unwrap().get0::<i32>()?()?; /// let count = linker.get_one_by_name("", Some("run"))?.into_func().unwrap().get0::<i32>()?()?;
/// assert_eq!(count, 0, "a Command should get a fresh instance on each invocation"); /// assert_eq!(count, 0, "a Command should get a fresh instance on each invocation");
/// ///
/// # Ok(()) /// # Ok(())

View File

@@ -406,7 +406,7 @@ impl Module {
/// assert_eq!(module.imports().len(), 1); /// assert_eq!(module.imports().len(), 1);
/// let import = module.imports().next().unwrap(); /// let import = module.imports().next().unwrap();
/// assert_eq!(import.module(), "host"); /// assert_eq!(import.module(), "host");
/// assert_eq!(import.name(), "foo"); /// assert_eq!(import.name(), Some("foo"));
/// match import.ty() { /// match import.ty() {
/// ExternType::Func(_) => { /* ... */ } /// ExternType::Func(_) => { /* ... */ }
/// _ => panic!("unexpected import type!"), /// _ => panic!("unexpected import type!"),