Normalize Crate Names in SRML/Node Template (#3543)

* Fix some instances of `runtime-io`

* Patch a bunch

* More patches for consistancy

* more patch

* Fix various build issues

* Fix tests

* Patch `srml-support-*` crates

* Fix doc tests

* Revert "Fix doc tests"

This reverts commit ba2ec61da7acc36821a70e76a31a6a5bf13bbe95.

* Revert "Patch `srml-support-*` crates"

This reverts commit 9a6070450107dec17784ba34af4b871023f6dc81.

* Missed one

* Fix doc tests
This commit is contained in:
Shawn Tabrizi
2019-09-04 14:44:28 +02:00
committed by GitHub
parent 875fa73728
commit c284ca2138
84 changed files with 246 additions and 250 deletions
+4 -6
View File
@@ -8,14 +8,12 @@ edition = "2018"
serde = { version = "1.0", optional = true }
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
sr-io = { path = "../../core/sr-io", default-features = false }
runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
srml-support = { path = "../support", default-features = false }
srml-support-procedural = { path = "../support/procedural" }
support = { package = "srml-support", path = "../support", default-features = false }
system = { package = "srml-system", path = "../system", default-features = false }
[dev-dependencies]
sr-io = { path = "../../core/sr-io", default-features = false }
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
[features]
@@ -24,8 +22,8 @@ std = [
"serde",
"codec/std",
"rstd/std",
"sr-io/std",
"runtime-io/std",
"sr-primitives/std",
"srml-support/std",
"support/std",
"system/std",
]
+3 -3
View File
@@ -51,7 +51,7 @@
//! This is an example of a module that exposes a privileged function:
//!
//! ```
//! use srml_support::{decl_module, dispatch::Result};
//! use support::{decl_module, dispatch::Result};
//! use system::ensure_root;
//!
//! pub trait Trait: system::Trait {}
@@ -89,7 +89,7 @@
use rstd::prelude::*;
use sr_primitives::traits::StaticLookup;
use sr_primitives::weights::SimpleDispatchInfo;
use srml_support::{
use support::{
StorageValue, Parameter, Dispatchable, decl_module, decl_event,
decl_storage, ensure
};
@@ -126,7 +126,7 @@ decl_module! {
let res = match proposal.dispatch(system::RawOrigin::Root.into()) {
Ok(_) => true,
Err(e) => {
sr_io::print(e);
runtime_io::print(e);
false
}
};