mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 22:01:04 +00:00
Update srml-contract to Rust 2018. (#1510)
* Fix imports. * Remove redundant binding * Clean extern crates. * Add comment * Re-export macros from prelude * Build fixes * Update core/sr-std/src/lib.rs Co-Authored-By: pepyakin <s.pepyakin@gmail.com>
This commit is contained in:
@@ -18,14 +18,15 @@
|
||||
//! wasm module before execution. It also extracts some essential information
|
||||
//! from a module.
|
||||
|
||||
use crate::wasm::env_def::ImportSatisfyCheck;
|
||||
use crate::wasm::PrefabWasmModule;
|
||||
use crate::{Schedule, Trait};
|
||||
|
||||
use parity_wasm::elements::{self, Internal, External, MemoryType, Type};
|
||||
use pwasm_utils;
|
||||
use pwasm_utils::rules;
|
||||
use rstd::prelude::*;
|
||||
use runtime_primitives::traits::As;
|
||||
use wasm::env_def::ImportSatisfyCheck;
|
||||
use wasm::PrefabWasmModule;
|
||||
use {Schedule, Trait};
|
||||
|
||||
struct ContractModule<'a, Gas: 'a> {
|
||||
// An `Option` is used here for loaning (`take()`-ing) the module.
|
||||
@@ -316,10 +317,11 @@ pub fn prepare_contract<T: Trait, C: ImportSatisfyCheck>(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::tests::Test;
|
||||
use crate::exec::Ext;
|
||||
use std::fmt;
|
||||
use tests::Test;
|
||||
use exec::Ext;
|
||||
use wabt;
|
||||
use assert_matches::assert_matches;
|
||||
|
||||
impl fmt::Debug for PrefabWasmModule {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
||||
Reference in New Issue
Block a user