Switch from error_core to failure.

This commit is contained in:
Dan Gohman
2018-02-15 23:14:33 -08:00
parent e37f45667f
commit 6c9cf2bacf
11 changed files with 33 additions and 99 deletions

View File

@@ -9,7 +9,6 @@ use cretonne::ir::types::*;
use cretonne::cursor::FuncCursor;
use cretonne::settings;
use wasmparser;
use std::error::Error;
use std::vec::Vec;
use std::string::String;
@@ -387,7 +386,7 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
let reader = wasmparser::BinaryReader::new(body_bytes);
self.trans
.translate_from_reader(reader, &mut func, &mut func_environ)
.map_err(|e| String::from(e.description()))?;
.map_err(|e| format!("{}", e))?;
func
};
self.func_bytecode_sizes.push(body_bytes.len());