Use embedded API in the wasmtime-rust (#540)

This commit is contained in:
Yury Delendik
2019-11-13 09:15:37 -06:00
committed by Alex Crichton
parent 2737c5e8e5
commit 98266498af
13 changed files with 316 additions and 112 deletions

View File

@@ -255,7 +255,7 @@ impl Global {
} else {
panic!("wasmtime export is not memory")
};
let ty = GlobalType::from_cranelift_global(global.clone());
let ty = GlobalType::from_cranelift_global(&global);
Global {
_store: store.clone(),
r#type: ty,
@@ -395,7 +395,7 @@ impl Table {
} else {
panic!("wasmtime export is not table")
};
let ty = TableType::from_cranelift_table(table.table.clone());
let ty = TableType::from_cranelift_table(&table.table);
Table {
store: store.clone(),
r#type: ty,
@@ -479,7 +479,7 @@ impl Memory {
} else {
panic!("wasmtime export is not memory")
};
let ty = MemoryType::from_cranelift_memory(memory.memory.clone());
let ty = MemoryType::from_cranelift_memory(&memory.memory);
Memory {
_store: store.clone(),
r#type: ty,