diff --git a/substrate/core/primitives/src/lib.rs b/substrate/core/primitives/src/lib.rs index 09b4e9a49e..e52d7b9490 100644 --- a/substrate/core/primitives/src/lib.rs +++ b/substrate/core/primitives/src/lib.rs @@ -21,6 +21,8 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(alloc))] +/// Initalise a key-value collection from array. +/// /// Creates a vector of given pairs and calls `collect` on the iterator from it. /// Can be used to create a `HashMap`. #[macro_export] diff --git a/substrate/core/sr-primitives/src/lib.rs b/substrate/core/sr-primitives/src/lib.rs index cf820b3fbd..6621c693ae 100644 --- a/substrate/core/sr-primitives/src/lib.rs +++ b/substrate/core/sr-primitives/src/lib.rs @@ -62,6 +62,8 @@ pub type RuntimeString = &'static str; macro_rules! create_runtime_str { ( $y:expr ) => {{ ::std::borrow::Cow::Borrowed($y) }} } + +/// Create a const [RuntimeString]. #[cfg(not(feature = "std"))] #[macro_export] macro_rules! create_runtime_str { @@ -319,6 +321,7 @@ pub fn verify_encoded_lazy(sig: &V, item: &T, signe ) } +/// Helper macro for `impl_outer_config` #[macro_export] macro_rules! __impl_outer_config_types { ( diff --git a/substrate/srml/council/src/lib.rs b/substrate/srml/council/src/lib.rs index c630c587d3..3eca2ffca0 100644 --- a/substrate/srml/council/src/lib.rs +++ b/substrate/srml/council/src/lib.rs @@ -26,7 +26,7 @@ extern crate serde; extern crate hex_literal; extern crate parity_codec as codec; -#[macro_use] extern crate parity_codec_derive; +extern crate parity_codec_derive; extern crate substrate_primitives; extern crate sr_std as rstd; extern crate sr_io as runtime_io; diff --git a/substrate/srml/example/src/lib.rs b/substrate/srml/example/src/lib.rs index cfad2f4997..3dae6d729b 100644 --- a/substrate/srml/example/src/lib.rs +++ b/substrate/srml/example/src/lib.rs @@ -36,7 +36,6 @@ extern crate substrate_primitives; extern crate sr_primitives; // Needed for deriving `Encode` and `Decode` for `RawEvent`. -#[macro_use] extern crate parity_codec_derive; extern crate parity_codec as codec; diff --git a/substrate/srml/executive/src/lib.rs b/substrate/srml/executive/src/lib.rs index 6646b229b8..e9a46dfff3 100644 --- a/substrate/srml/executive/src/lib.rs +++ b/substrate/srml/executive/src/lib.rs @@ -19,7 +19,6 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(test)] -#[macro_use] extern crate parity_codec_derive; #[cfg_attr(test, macro_use)] diff --git a/substrate/srml/session/src/lib.rs b/substrate/srml/session/src/lib.rs index 032b3328a3..4e22a59dbe 100644 --- a/substrate/srml/session/src/lib.rs +++ b/substrate/srml/session/src/lib.rs @@ -24,7 +24,6 @@ extern crate sr_std as rstd; #[macro_use] extern crate srml_support as runtime_support; -#[macro_use] extern crate parity_codec_derive; #[cfg(test)] diff --git a/substrate/srml/sudo/src/lib.rs b/substrate/srml/sudo/src/lib.rs index 63591aba88..3ea2dda8d7 100644 --- a/substrate/srml/sudo/src/lib.rs +++ b/substrate/srml/sudo/src/lib.rs @@ -25,7 +25,6 @@ extern crate sr_io; #[cfg(test)] extern crate substrate_primitives; extern crate sr_primitives; -#[macro_use] extern crate parity_codec_derive; extern crate parity_codec as codec; #[macro_use] diff --git a/substrate/srml/upgrade-key/src/lib.rs b/substrate/srml/upgrade-key/src/lib.rs index 1b10d3a3d3..ab46321d8e 100644 --- a/substrate/srml/upgrade-key/src/lib.rs +++ b/substrate/srml/upgrade-key/src/lib.rs @@ -25,7 +25,6 @@ extern crate sr_io; #[cfg(test)] extern crate substrate_primitives; extern crate sr_primitives; -#[macro_use] extern crate parity_codec_derive; extern crate parity_codec as codec; #[macro_use]