From 0dfa1f68a8869881faae79df75987b089e6eec61 Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 31 Jul 2019 23:51:12 -0700 Subject: [PATCH] Formatted code --- lib/emscripten/src/lib.rs | 2 +- lib/llvm-backend/src/intrinsics.rs | 2 +- lib/runtime-core/src/import.rs | 2 +- lib/runtime-core/src/module.rs | 2 +- lib/runtime-core/src/sig_registry.rs | 2 +- lib/runtime-core/src/sys/mod.rs | 4 ++-- lib/runtime-core/src/vm.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/emscripten/src/lib.rs b/lib/emscripten/src/lib.rs index 803c4e04c..e62201c0e 100644 --- a/lib/emscripten/src/lib.rs +++ b/lib/emscripten/src/lib.rs @@ -3,9 +3,9 @@ #[macro_use] extern crate wasmer_runtime_core; -use std::collections::HashMap; use lazy_static::lazy_static; use std::cell::UnsafeCell; +use std::collections::HashMap; use std::path::PathBuf; use std::{f64, ffi::c_void}; use wasmer_runtime_core::{ diff --git a/lib/llvm-backend/src/intrinsics.rs b/lib/llvm-backend/src/intrinsics.rs index bd251b21d..0d4e05087 100644 --- a/lib/llvm-backend/src/intrinsics.rs +++ b/lib/llvm-backend/src/intrinsics.rs @@ -1,4 +1,3 @@ -use std::collections::HashMap; use inkwell::{ builder::Builder, context::Context, @@ -9,6 +8,7 @@ use inkwell::{ values::{BasicValue, BasicValueEnum, FloatValue, FunctionValue, IntValue, PointerValue}, AddressSpace, }; +use std::collections::HashMap; use std::marker::PhantomData; use wasmer_runtime_core::{ memory::MemoryType, diff --git a/lib/runtime-core/src/import.rs b/lib/runtime-core/src/import.rs index 9e2f0ef63..a7ca8de84 100644 --- a/lib/runtime-core/src/import.rs +++ b/lib/runtime-core/src/import.rs @@ -1,6 +1,6 @@ use crate::export::Export; -use std::collections::{hash_map::Entry, HashMap}; use std::collections::VecDeque; +use std::collections::{hash_map::Entry, HashMap}; use std::{ cell::{Ref, RefCell}, ffi::c_void, diff --git a/lib/runtime-core/src/module.rs b/lib/runtime-core/src/module.rs index 726c9ecde..1faad791c 100644 --- a/lib/runtime-core/src/module.rs +++ b/lib/runtime-core/src/module.rs @@ -14,8 +14,8 @@ use crate::{ }; use crate::backend::CacheGen; -use std::collections::HashMap; use indexmap::IndexMap; +use std::collections::HashMap; use std::sync::Arc; /// This is used to instantiate a new WebAssembly module. diff --git a/lib/runtime-core/src/sig_registry.rs b/lib/runtime-core/src/sig_registry.rs index f723514f6..97a69c02d 100644 --- a/lib/runtime-core/src/sig_registry.rs +++ b/lib/runtime-core/src/sig_registry.rs @@ -2,9 +2,9 @@ use crate::{ structures::Map, types::{FuncSig, SigIndex}, }; -use std::collections::HashMap; use lazy_static::lazy_static; use parking_lot::RwLock; +use std::collections::HashMap; use std::sync::Arc; lazy_static! { diff --git a/lib/runtime-core/src/sys/mod.rs b/lib/runtime-core/src/sys/mod.rs index ac83be473..a9008a738 100644 --- a/lib/runtime-core/src/sys/mod.rs +++ b/lib/runtime-core/src/sys/mod.rs @@ -16,7 +16,7 @@ use serde::{ Deserialize, Deserializer, Serialize, Serializer, }; -use serde_bytes::{Bytes, ByteBuf}; +use serde_bytes::{ByteBuf, Bytes}; use std::fmt; @@ -59,7 +59,7 @@ impl<'de> Deserialize<'de> for Memory { let bytes: ByteBuf = seq .next_element()? .ok_or_else(|| de::Error::invalid_length(1, &self))?; - + let mut memory = Memory::with_size_protect(bytes.len(), Protect::ReadWrite) .expect("Could not create a memory"); diff --git a/lib/runtime-core/src/vm.rs b/lib/runtime-core/src/vm.rs index d8a7293cc..291c08bc2 100644 --- a/lib/runtime-core/src/vm.rs +++ b/lib/runtime-core/src/vm.rs @@ -850,8 +850,8 @@ mod vm_ctx_tests { use crate::cache::Error as CacheError; use crate::typed_func::Wasm; use crate::types::{LocalFuncIndex, SigIndex}; - use std::collections::HashMap; use std::any::Any; + use std::collections::HashMap; use std::ptr::NonNull; struct Placeholder; impl RunnableModule for Placeholder {