mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
Migrate srml crates to the 2018 edition (#1755)
This commit is contained in:
committed by
Gav Wood
parent
b28f7328ac
commit
c860787db7
@@ -2,21 +2,24 @@
|
||||
name = "srml-session"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1.0"
|
||||
serde = { version = "1.0", default-features = false }
|
||||
safe-mix = { version = "1.0", default-features = false}
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
parity-codec = { version = "3.0", default-features = false }
|
||||
parity-codec-derive = { version = "3.0", 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 }
|
||||
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-consensus = { path = "../consensus", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
srml-timestamp = { path = "../timestamp", default-features = false }
|
||||
consensus = { package = "srml-consensus", path = "../consensus", default-features = false }
|
||||
system = { package = "srml-system", path = "../system", default-features = false }
|
||||
timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -25,12 +28,10 @@ std = [
|
||||
"safe-mix/std",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
"rstd/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-consensus/std",
|
||||
"srml-system/std",
|
||||
"srml-timestamp/std"
|
||||
"primitives/std",
|
||||
"consensus/std",
|
||||
"system/std",
|
||||
"timestamp/std"
|
||||
]
|
||||
|
||||
@@ -19,28 +19,10 @@
|
||||
|
||||
#![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_derive;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate substrate_primitives;
|
||||
#[cfg(test)]
|
||||
extern crate sr_io as runtime_io;
|
||||
extern crate parity_codec as codec;
|
||||
extern crate sr_primitives as primitives;
|
||||
extern crate srml_consensus as consensus;
|
||||
extern crate srml_system as system;
|
||||
extern crate srml_timestamp as timestamp;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use primitives::traits::{As, Zero, One, Convert};
|
||||
use runtime_support::{StorageValue, StorageMap};
|
||||
use runtime_support::dispatch::Result;
|
||||
use runtime_support::for_each_tuple;
|
||||
use srml_support::{StorageValue, StorageMap, for_each_tuple, decl_module, decl_event, decl_storage};
|
||||
use srml_support::dispatch::Result;
|
||||
use system::ensure_signed;
|
||||
use rstd::ops::Mul;
|
||||
|
||||
@@ -231,6 +213,7 @@ impl<T: Trait> Module<T> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use srml_support::{impl_outer_origin, assert_ok};
|
||||
use runtime_io::with_externalities;
|
||||
use substrate_primitives::{H256, Blake2Hasher};
|
||||
use primitives::BuildStorage;
|
||||
|
||||
Reference in New Issue
Block a user