Fix doctests
This commit is contained in:
@@ -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::<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");
|
||||
///
|
||||
/// # Ok(())
|
||||
|
||||
@@ -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!"),
|
||||
|
||||
Reference in New Issue
Block a user