Format it.

This commit is contained in:
Sergey Pepyakin 2019-04-15 17:34:09 +02:00
parent 1dad287999
commit 3cc5dd6485
8 changed files with 11 additions and 14 deletions

View File

@ -10,7 +10,6 @@ use hashbrown::HashMap;
#[cfg(feature = "std")]
use std::collections::HashMap;
use validation::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use core::cell::Ref;
use func::{FuncBody, FuncInstance, FuncRef};
use global::{GlobalInstance, GlobalRef};
@ -21,6 +20,7 @@ use memory_units::Pages;
use parity_wasm::elements::{External, InitExpr, Instruction, Internal, ResizableLimits, Type};
use table::TableRef;
use types::{GlobalDescriptor, MemoryDescriptor, TableDescriptor};
use validation::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use {Error, MemoryInstance, Module, RuntimeValue, Signature, TableInstance};
/// Reference to a [`ModuleInstance`].

View File

@ -4,9 +4,9 @@ use validation::context::ModuleContext;
use validation::func::{
require_label, top_label, BlockFrame, FunctionValidationContext, StackValueType, StartedWith,
};
use validation::stack::StackWithLimit;
use validation::util::Locals;
use validation::{Error, FunctionValidator};
use validation::stack::StackWithLimit;
use isa;

View File

@ -1,4 +1,7 @@
use crate::{isa, validation::{Error, validate_module2, Validation}};
use crate::{
isa,
validation::{validate_module2, Error, Validation},
};
use parity_wasm::elements::Module;
mod compile;

View File

@ -1,6 +1,5 @@
#[allow(unused_imports)]
use alloc::prelude::*;
use validation::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use core::fmt;
use core::ops;
use core::{u32, usize};
@ -12,6 +11,7 @@ use memory_units::Pages;
use module::ModuleRef;
use nan_preserving_float::{F32, F64};
use parity_wasm::elements::Local;
use validation::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use value::{
ArithmeticOps, ExtendInto, Float, Integer, LittleEndianConvert, RuntimeValue, TransmuteInto,
TryTruncateInto, WrapInto,

View File

@ -1,9 +1,9 @@
use crate::Error;
#[allow(unused_imports)]
use alloc::prelude::*;
use parity_wasm::elements::{
BlockType, FunctionType, GlobalType, MemoryType, TableType, ValueType,
};
use crate::Error;
#[derive(Default, Debug)]
pub struct ModuleContext {

View File

@ -2,13 +2,8 @@
use alloc::prelude::*;
use crate::{
DEFAULT_MEMORY_INDEX,
DEFAULT_TABLE_INDEX,
Error,
FunctionValidator,
stack::StackWithLimit,
util::Locals,
context::ModuleContext,
context::ModuleContext, stack::StackWithLimit, util::Locals, Error, FunctionValidator,
DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX,
};
use core::u32;

View File

@ -1,7 +1,6 @@
// TODO: Uncomment
// #![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
//// alloc is required in no_std
#![cfg_attr(not(feature = "std"), feature(alloc))]

View File

@ -1,7 +1,7 @@
use crate::Error;
#[allow(unused_imports)]
use alloc::prelude::*;
use parity_wasm::elements::{Local, ValueType};
use crate::Error;
/// Locals are the concatenation of a slice of function parameters
/// with function declared local variables.