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

View File

@ -4,9 +4,9 @@ use validation::context::ModuleContext;
use validation::func::{ use validation::func::{
require_label, top_label, BlockFrame, FunctionValidationContext, StackValueType, StartedWith, require_label, top_label, BlockFrame, FunctionValidationContext, StackValueType, StartedWith,
}; };
use validation::stack::StackWithLimit;
use validation::util::Locals; use validation::util::Locals;
use validation::{Error, FunctionValidator}; use validation::{Error, FunctionValidator};
use validation::stack::StackWithLimit;
use isa; 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; use parity_wasm::elements::Module;
mod compile; mod compile;

View File

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

View File

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

View File

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

View File

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

View File

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