Fail with Trap in Instance::new() instead of Error (#683)

This commit is contained in:
Yury Delendik
2019-12-30 16:25:16 -06:00
committed by GitHub
parent 51f3ac0c45
commit 681445b18b
18 changed files with 172 additions and 86 deletions

View File

@@ -7,7 +7,7 @@ use wasmtime::*;
struct HelloCallback;
impl Callable for HelloCallback {
fn call(&self, _params: &[Val], _results: &mut [Val]) -> Result<(), HostRef<Trap>> {
fn call(&self, _params: &[Val], _results: &mut [Val]) -> Result<(), Trap> {
println!("Calling back...");
println!("> Hello World!");
Ok(())