mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-18 19:31:22 +00:00
Fix some tests
This commit is contained in:
@ -187,6 +187,13 @@ impl From<RuntimeError> for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<ResolveError> for Error {
|
||||||
|
fn from(resolve_err: ResolveError) -> Self {
|
||||||
|
Error::ResolveError(resolve_err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
impl From<CallError> for Error {
|
impl From<CallError> for Error {
|
||||||
fn from(call_err: CallError) -> Self {
|
fn from(call_err: CallError) -> Self {
|
||||||
Error::CallError(call_err)
|
Error::CallError(call_err)
|
||||||
|
@ -438,7 +438,7 @@ impl<'a> DynFunc<'a> {
|
|||||||
/// # use wasmer_runtime_core::error::CallResult;
|
/// # use wasmer_runtime_core::error::CallResult;
|
||||||
/// # fn call_foo(instance: &mut Instance) -> CallResult<()> {
|
/// # fn call_foo(instance: &mut Instance) -> CallResult<()> {
|
||||||
/// instance
|
/// instance
|
||||||
/// .func("foo")?
|
/// .dyn_func("foo")?
|
||||||
/// .call(&[])?;
|
/// .call(&[])?;
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
|
@ -74,7 +74,7 @@ impl Module {
|
|||||||
/// let import_object = imports! {
|
/// let import_object = imports! {
|
||||||
/// // ...
|
/// // ...
|
||||||
/// };
|
/// };
|
||||||
/// let instance = module.instantiate(import_object)?;
|
/// let instance = module.instantiate(&import_object)?;
|
||||||
/// // ...
|
/// // ...
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
//! // We're not importing anything, so make an empty import object.
|
//! // We're not importing anything, so make an empty import object.
|
||||||
//! let import_object = imports! {};
|
//! let import_object = imports! {};
|
||||||
//!
|
//!
|
||||||
//! let mut instance = instantiate(WASM, import_object)?;
|
//! let mut instance = instantiate(WASM, &import_object)?;
|
||||||
//!
|
//!
|
||||||
//! let add_one: Func<i32, i32> = instance.func("add_one")?;
|
//! let add_one: Func<i32, i32> = instance.func("add_one")?;
|
||||||
//!
|
//!
|
||||||
|
Reference in New Issue
Block a user