diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs index 7f18130d67..dc9c6ba188 100644 --- a/cranelift/src/wasm.rs +++ b/cranelift/src/wasm.rs @@ -139,8 +139,7 @@ fn handle_module( return Err(String::from("wat2wasm not found")); } else { return Err(String::from(e.description())); - }) - .unwrap(); + })?; read_wasm_file(file_path).map_err(|err| { String::from(err.description()) })?