Make the "wat2wasm" error message not panic.

This commit is contained in:
Dan Gohman
2017-10-03 09:31:42 -07:00
parent 1efa670f60
commit eba55cb1da

View File

@@ -139,8 +139,7 @@ fn handle_module(
return Err(String::from("wat2wasm not found")); return Err(String::from("wat2wasm not found"));
} else { } else {
return Err(String::from(e.description())); return Err(String::from(e.description()));
}) })?;
.unwrap();
read_wasm_file(file_path).map_err(|err| { read_wasm_file(file_path).map_err(|err| {
String::from(err.description()) String::from(err.description())
})? })?