From 765357e35d0919ba15cfaabc1a3c446a59d4fbe0 Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Mon, 4 Feb 2019 15:33:45 -0800 Subject: [PATCH] pass import object by reference in some spectests --- lib/spectests/build/spectests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spectests/build/spectests.rs b/lib/spectests/build/spectests.rs index 867f99454..1d3bed5db 100644 --- a/lib/spectests/build/spectests.rs +++ b/lib/spectests/build/spectests.rs @@ -99,7 +99,7 @@ pub fn generate_imports() -> ImportObject { let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &CraneliftCompiler::new()) .expect("WASM can't be compiled"); let instance = module - .instantiate(ImportObject::new()) + .instantiate(&ImportObject::new()) .expect("WASM can't be instantiated"); let mut imports = ImportObject::new(); imports.register("spectest", instance); @@ -358,7 +358,7 @@ fn test_module_{}() {{ println!(\"{{}}\", module_str); let wasm_binary = wat2wasm(module_str.as_bytes()).expect(\"WAST not valid or malformed\"); let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &CraneliftCompiler::new()).expect(\"WASM can't be compiled\"); - module.instantiate(generate_imports()).expect(\"WASM can't be instantiated\") + module.instantiate(&generate_imports()).expect(\"WASM can't be instantiated\") }}\n", self.last_module, // We do this to ident four spaces, so it looks aligned to the function body