Fix formatting

This commit is contained in:
Syrus
2019-01-18 11:15:13 -08:00
parent 63a90d0ef0
commit 6d55776b8e
3 changed files with 5 additions and 5 deletions

View File

@ -25,10 +25,10 @@ pub mod vm;
pub mod vmcalls; pub mod vmcalls;
use self::error::CompileResult; use self::error::CompileResult;
pub use self::error::Result;
pub use self::instance::Instance; pub use self::instance::Instance;
#[doc(inline)] #[doc(inline)]
pub use self::module::Module; pub use self::module::Module;
pub use self::error::Result;
use std::rc::Rc; use std::rc::Rc;
/// Compile a webassembly module using the provided compiler. /// Compile a webassembly module using the provided compiler.

View File

@ -71,8 +71,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
let isa = webassembly::get_isa(); let isa = webassembly::get_isa();
debug!("webassembly - creating module"); debug!("webassembly - creating module");
let module = webassembly::compile(&wasm_binary[..]) let module = webassembly::compile(&wasm_binary[..]).map_err(|e| format!("{:?}", e))?;
.map_err(|e| format!("{:?}", e))?;
let abi = if wasmer_emscripten::is_emscripten_module(&module) { let abi = if wasmer_emscripten::is_emscripten_module(&module) {
webassembly::InstanceABI::Emscripten webassembly::InstanceABI::Emscripten
@ -107,7 +106,8 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
&mut instance, &mut instance,
options.path.to_str().unwrap(), options.path.to_str().unwrap(),
options.args.iter().map(|arg| arg.as_str()).collect(), options.args.iter().map(|arg| arg.as_str()).collect(),
).map_err(|e| format!("{:?}", e))?) )
.map_err(|e| format!("{:?}", e))?)
} }
fn run(options: Run) { fn run(options: Run) {

View File

@ -5,10 +5,10 @@ pub mod utils;
use wasmer_clif_backend::CraneliftCompiler; use wasmer_clif_backend::CraneliftCompiler;
use wasmer_runtime::{ use wasmer_runtime::{
self as runtime, self as runtime,
error::{CallResult, Result},
import::Imports, import::Imports,
instance::Instance, instance::Instance,
module::{Module, ModuleInner}, module::{Module, ModuleInner},
error::{Result, CallResult},
}; };
use cranelift_codegen::{ use cranelift_codegen::{