diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs index 11acbb1b4a..99071b1bc8 100644 --- a/lib/wasm/src/module_translator.rs +++ b/lib/wasm/src/module_translator.rs @@ -58,10 +58,10 @@ impl ImportMappings { /// [`Function`](../cretonne/ir/function/struct.Function.html). /// Returns the functions and also the mappings for imported functions and signature between the /// indexes in the wasm module and the indexes inside each functions. -pub fn translate_module(data: &Vec, +pub fn translate_module(data: &[u8], runtime: &mut WasmRuntime) -> Result { - let mut parser = Parser::new(data.as_slice()); + let mut parser = Parser::new(data); match *parser.read() { ParserState::BeginWasm { .. } => {} ParserState::Error(BinaryReaderError { message, offset }) => {