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
+12 -10
View File
@@ -2,6 +2,7 @@
name = "srml-consensus"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
hex-literal = "0.1.0"
@@ -9,12 +10,14 @@ serde = { version = "1.0", default-features = false }
parity-codec = { version = "3.0", default-features = false }
parity-codec-derive = { version = "3.0", default-features = false }
substrate-primitives = { path = "../../core/primitives", default-features = false }
substrate-inherents = { path = "../../core/inherents", default-features = false }
sr-std = { path = "../../core/sr-std", default-features = false }
sr-io = { path = "../../core/sr-io", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
srml-support = { path = "../support", default-features = false }
srml-system = { path = "../system", default-features = false }
system = { package = "srml-system", path = "../system", default-features = false }
[dev-dependencies]
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
[features]
default = ["std"]
@@ -22,10 +25,9 @@ std = [
"serde/std",
"parity-codec/std",
"substrate-primitives/std",
"sr-std/std",
"sr-io/std",
"rstd/std",
"srml-support/std",
"sr-primitives/std",
"srml-system/std",
"substrate-inherents/std",
"primitives/std",
"system/std",
"inherents/std",
]
+3 -17
View File
@@ -18,27 +18,13 @@
#![cfg_attr(not(feature = "std"), no_std)]
extern crate sr_std as rstd;
#[macro_use]
extern crate srml_support as runtime_support;
extern crate parity_codec;
#[macro_use]
extern crate parity_codec_derive;
extern crate sr_primitives as primitives;
extern crate parity_codec as codec;
extern crate srml_system as system;
extern crate substrate_primitives;
#[cfg(test)]
extern crate sr_io as runtime_io;
extern crate substrate_inherents as inherents;
use rstd::prelude::*;
use parity_codec::Encode;
use parity_codec as codec;
use codec::Encode;
use parity_codec_derive::{Encode, Decode};
use runtime_support::{storage, Parameter};
use runtime_support::storage::StorageValue;
use runtime_support::storage::unhashed::StorageVec;
+2 -2
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 {GenesisConfig, Trait, Module, system};
use crate::{GenesisConfig, Trait, Module};
impl_outer_origin!{
pub enum Origin for Test {}
@@ -33,7 +33,7 @@ pub struct Test;
impl Trait for Test {
type Log = DigestItem;
type SessionKey = UintAuthorityId;
type InherentOfflineReport = ::InstantFinalityReportVec<()>;
type InherentOfflineReport = crate::InstantFinalityReportVec<()>;
}
impl system::Trait for Test {
type Origin = Origin;
+1 -1
View File
@@ -20,7 +20,7 @@
use primitives::{generic, testing::{self, UintAuthorityId}, traits::OnFinalise};
use runtime_io::with_externalities;
use mock::{Consensus, System, new_test_ext};
use crate::mock::{Consensus, System, new_test_ext};
use inherents::{InherentData, ProvideInherent};
#[test]