mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-01 23:41:03 +00:00
Fix doc tests
This commit is contained in:
parent
bc2e527bb2
commit
147b214965
@ -179,6 +179,12 @@ impl From<Box<RuntimeError>> for Box<CallError> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Box<ResolveError>> for Box<CallError> {
|
||||||
|
fn from(resolve_err: Box<ResolveError>) -> Self {
|
||||||
|
Box::new(CallError::Resolve(*resolve_err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<CompileError> for Box<Error> {
|
impl From<CompileError> for Box<Error> {
|
||||||
fn from(compile_err: CompileError) -> Self {
|
fn from(compile_err: CompileError) -> Self {
|
||||||
Box::new(Error::CompileError(compile_err))
|
Box::new(Error::CompileError(compile_err))
|
||||||
|
@ -77,11 +77,12 @@ impl Instance {
|
|||||||
/// # Usage:
|
/// # Usage:
|
||||||
/// ```
|
/// ```
|
||||||
/// # use wasmer_runtime_core::Instance;
|
/// # use wasmer_runtime_core::Instance;
|
||||||
/// # fn call_foo(instance: &mut Instance) -> Option<()> {
|
/// # use wasmer_runtime_core::error::CallResult;
|
||||||
|
/// # fn call_foo(instance: &mut Instance) -> CallResult<()> {
|
||||||
/// instance
|
/// instance
|
||||||
/// .func("foo")?
|
/// .func("foo")?
|
||||||
/// .call(&[])?;
|
/// .call(&[])?;
|
||||||
/// # Some(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn func(&mut self, name: &str) -> ResolveResult<Function> {
|
pub fn func(&mut self, name: &str) -> ResolveResult<Function> {
|
||||||
@ -417,11 +418,12 @@ impl<'a> Function<'a> {
|
|||||||
/// # Usage:
|
/// # Usage:
|
||||||
/// ```
|
/// ```
|
||||||
/// # use wasmer_runtime_core::Instance;
|
/// # use wasmer_runtime_core::Instance;
|
||||||
/// # fn call_foo(instance: &mut Instance) -> Option<()> {
|
/// # use wasmer_runtime_core::error::CallResult;
|
||||||
|
/// # fn call_foo(instance: &mut Instance) -> CallResult<()> {
|
||||||
/// instance
|
/// instance
|
||||||
/// .func("foo")?
|
/// .func("foo")?
|
||||||
/// .call(&[])?;
|
/// .call(&[])?;
|
||||||
/// # Some(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn call(&mut self, params: &[Value]) -> CallResult<Vec<Value>> {
|
pub fn call(&mut self, params: &[Value]) -> CallResult<Vec<Value>> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user