Fix merge errors

This commit is contained in:
Felix Schütt
2022-08-31 13:33:51 +02:00
parent a5d0944b9f
commit 3dc2e26b22
2 changed files with 3 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ impl Imports {
module: &Module, module: &Module,
object: js_sys::Object, object: js_sys::Object,
) -> Result<Self, WasmError> { ) -> Result<Self, WasmError> {
use crate::js::externals::VMExtern;
let module_imports: HashMap<(String, String), ExternType> = module let module_imports: HashMap<(String, String), ExternType> = module
.imports() .imports()
.map(|import| { .map(|import| {
@@ -217,7 +218,7 @@ impl Imports {
let import_js: wasm_bindgen::JsValue = import_entry.get(1); let import_js: wasm_bindgen::JsValue = import_entry.get(1);
let key = (module_name.clone(), import_name); let key = (module_name.clone(), import_name);
let extern_type = module_imports.get(&key).unwrap(); let extern_type = module_imports.get(&key).unwrap();
let export = Export::from_js_value(import_js, store, extern_type.clone())?; let export = VMExtern::from_js_value(import_js, store, extern_type.clone())?;
let extern_ = Extern::from_vm_extern(store, export); let extern_ = Extern::from_vm_extern(store, export);
map.insert(key, extern_); map.insert(key, extern_);
} }

View File

@@ -109,7 +109,7 @@ impl Instance {
instance: WebAssembly::Instance, instance: WebAssembly::Instance,
) -> Result<Self, InstantiationError> { ) -> Result<Self, InstantiationError> {
use crate::js::externals::VMExtern; use crate::js::externals::VMExtern;
let instance_exports = instance.get(store.as_store_ref().objects()).exports(); let instance_exports = instance.exports();
let exports = module let exports = module
.exports() .exports()
.map(|export_type| { .map(|export_type| {