Migrate srml-assets, srml-aura, srml-balances and srml-consens to the 2018 edition (#1633)

This commit is contained in:
Stanislav Tkach
2019-02-05 19:26:58 +02:00
committed by Bastian Köcher
parent 0242cee284
commit 1cb02c318b
18 changed files with 67 additions and 147 deletions
+2 -25
View File
@@ -18,34 +18,10 @@
#![cfg_attr(not(feature = "std"), no_std)]
extern crate sr_std as rstd;
#[macro_use]
extern crate parity_codec_derive;
extern crate parity_codec;
#[macro_use]
extern crate srml_support as runtime_support;
extern crate sr_primitives as primitives;
extern crate srml_system as system;
pub extern crate srml_timestamp as timestamp;
extern crate srml_staking as staking;
extern crate substrate_primitives;
extern crate substrate_inherents as inherents;
#[cfg(test)]
extern crate srml_consensus as consensus;
#[cfg(test)]
extern crate sr_io as runtime_io;
#[cfg(test)]
#[macro_use]
extern crate lazy_static;
#[cfg(test)]
extern crate parking_lot;
pub use timestamp;
use rstd::{result, prelude::*};
use runtime_support::storage::StorageValue;
@@ -55,6 +31,7 @@ use timestamp::OnTimestampSet;
use timestamp::TimestampInherentData;
#[cfg(feature = "std")]
use parity_codec::Decode;
use parity_codec_derive::{Encode, Decode};
use inherents::{RuntimeString, InherentIdentifier, InherentData, ProvideInherent, MakeFatalError};
#[cfg(feature = "std")]
use inherents::{InherentDataProviders, ProvideInherentData};
+1 -1
View File
@@ -21,7 +21,7 @@
use primitives::{BuildStorage, traits::IdentityLookup, testing::{Digest, DigestItem, Header, UintAuthorityId}};
use runtime_io;
use substrate_primitives::{H256, Blake2Hasher};
use {Trait, Module, consensus, system, timestamp};
use crate::{Trait, Module};
impl_outer_origin!{
pub enum Origin for Test {}
+3 -2
View File
@@ -18,11 +18,12 @@
#![cfg(test)]
use mock::{System, Aura, new_test_ext};
use lazy_static::lazy_static;
use crate::mock::{System, Aura, new_test_ext};
use primitives::traits::Header;
use runtime_io::with_externalities;
use parking_lot::Mutex;
use {AuraReport, HandleReport};
use crate::{AuraReport, HandleReport};
#[test]
fn aura_report_gets_skipped_correctly() {