standardize imports

This commit is contained in:
vms 2020-04-22 16:25:24 +03:00
parent 739d3461aa
commit 8ad42ba83f
5 changed files with 21 additions and 8 deletions

View File

@ -14,9 +14,10 @@
* limitations under the License.
*/
use std::path::PathBuf;
use wasmer_wasi::WasiVersion;
use std::path::PathBuf;
#[derive(Clone, Debug, PartialEq)]
pub struct WASIConfig {
/// Desired WASI version.

View File

@ -14,11 +14,17 @@
* limitations under the License.
*/
use std::error::Error;
use wasmer_runtime::error::{
CallError, CompileError, CreationError, Error as WasmerError, ResolveError, RuntimeError,
CallError,
CompileError,
CreationError,
Error as WasmerError,
ResolveError,
RuntimeError,
};
use std::error::Error;
#[derive(Debug)]
pub enum FrankError {
/// Errors related to the preparation (instrumentation and so on) and compilation by Wasmer steps.

View File

@ -15,7 +15,10 @@
*/
use crate::vm::{
config::Config, errors::FrankError, frank_result::FrankResult, prepare::prepare_module,
config::Config,
errors::FrankError,
frank_result::FrankResult,
prepare::prepare_module,
service::FluenceService,
};

View File

@ -18,12 +18,14 @@
// https://github.com/paritytech/substrate/blob/master/srml/contracts/src/wasm/prepare.rs
// https://github.com/nearprotocol/nearcore/blob/master/runtime/near-vm-runner/src/prepare.rs
use parity_wasm::builder;
use parity_wasm::elements;
use crate::vm::config::Config;
use crate::vm::errors::FrankError;
use parity_wasm::elements::{MemorySection, MemoryType};
use parity_wasm::{
elements::{MemorySection, MemoryType},
builder,
elements,
};
struct ModulePreparator {
module: elements::Module,

View File

@ -16,6 +16,7 @@
use crate::vm::errors::FrankError;
use crate::vm::frank_result::FrankResult;
use sha2::digest::generic_array::GenericArray;
/// Describes a service behaviour in the Fluence network.