Cargo fmt

This commit is contained in:
losfair
2019-07-04 01:45:54 +08:00
parent f32b22d571
commit 02464991da
4 changed files with 5 additions and 8 deletions

View File

@ -17,7 +17,8 @@ use std::sync::{Arc, RwLock};
use wasmparser::{self, WasmDecoder}; use wasmparser::{self, WasmDecoder};
use wasmparser::{Operator, Type as WpType}; use wasmparser::{Operator, Type as WpType};
pub type BreakpointHandler = Box<Fn(BreakpointInfo) -> Result<(), Box<dyn Any>> + Send + Sync + 'static>; pub type BreakpointHandler =
Box<Fn(BreakpointInfo) -> Result<(), Box<dyn Any>> + Send + Sync + 'static>;
pub type BreakpointMap = Arc<HashMap<usize, BreakpointHandler>>; pub type BreakpointMap = Arc<HashMap<usize, BreakpointHandler>>;
#[derive(Debug)] #[derive(Debug)]

View File

@ -359,8 +359,8 @@ impl InstanceImage {
#[cfg(all(unix, target_arch = "x86_64"))] #[cfg(all(unix, target_arch = "x86_64"))]
pub mod x64 { pub mod x64 {
use super::*; use super::*;
use crate::fault::{catch_unsafe_unwind, run_on_alternative_stack};
use crate::codegen::BreakpointMap; use crate::codegen::BreakpointMap;
use crate::fault::{catch_unsafe_unwind, run_on_alternative_stack};
use crate::structures::TypedIndex; use crate::structures::TypedIndex;
use crate::types::LocalGlobalIndex; use crate::types::LocalGlobalIndex;
use crate::vm::Ctx; use crate::vm::Ctx;

View File

@ -11,10 +11,8 @@
//! //!
use std::any::Any; use std::any::Any;
use std::cell::Cell; use std::cell::Cell;
use wasmer_runtime_core::fault::{
begin_unsafe_unwind, catch_unsafe_unwind, ensure_sighandler,
};
use wasmer_runtime_core::codegen::BreakpointMap; use wasmer_runtime_core::codegen::BreakpointMap;
use wasmer_runtime_core::fault::{begin_unsafe_unwind, catch_unsafe_unwind, ensure_sighandler};
use wasmer_runtime_core::typed_func::WasmTrapInfo; use wasmer_runtime_core::typed_func::WasmTrapInfo;
thread_local! { thread_local! {

View File

@ -514,9 +514,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
#[cfg(feature = "backend:singlepass")] #[cfg(feature = "backend:singlepass")]
unsafe { unsafe {
if options.backend == Backend::Singlepass { if options.backend == Backend::Singlepass {
use wasmer_runtime_core::fault::{ use wasmer_runtime_core::fault::{catch_unsafe_unwind, ensure_sighandler};
catch_unsafe_unwind, ensure_sighandler,
};
use wasmer_runtime_core::state::{ use wasmer_runtime_core::state::{
x64::invoke_call_return_on_stack, InstanceImage, x64::invoke_call_return_on_stack, InstanceImage,
}; };