diff --git a/substrate/core/inherents/src/lib.rs b/substrate/core/inherents/src/lib.rs index 16910fd4ab..9bf9272e57 100644 --- a/substrate/core/inherents/src/lib.rs +++ b/substrate/core/inherents/src/lib.rs @@ -50,6 +50,7 @@ pub use runtime_primitives::RuntimeString; pub type InherentIdentifier = [u8; 8]; /// Inherent data to include in a block. +#[derive(Clone, Default)] pub struct InherentData { /// All inherent data encoded with parity-codec and an identifier. data: BTreeMap> @@ -152,7 +153,7 @@ impl codec::Decode for InherentData { /// /// When a fatal error occurres, all other errors are removed and the implementation needs to /// abbort checking inherents. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, Clone, Default)] pub struct CheckInherentsResult { /// Did the check succeed? okay: bool, @@ -243,7 +244,7 @@ impl PartialEq for CheckInherentsResult { /// All `InherentData` providers. #[cfg(feature = "std")] -#[derive(Clone)] +#[derive(Clone, Default)] pub struct InherentDataProviders { providers: Arc>>>, } @@ -252,9 +253,7 @@ pub struct InherentDataProviders { impl InherentDataProviders { /// Create a new instance. pub fn new() -> Self { - Self { - providers: Default::default(), - } + Self::default() } /// Register an `InherentData` provider. diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index d7599c2c7f..f25a46f267 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -71,7 +71,7 @@ use runtime_primitives::ApplyResult; use runtime_primitives::transaction_validity::TransactionValidity; use runtime_primitives::generic; use runtime_primitives::traits::{ - Convert, BlakeTwo256, Block as BlockT, DigestFor, NumberFor, Extrinsic, StaticLookup, + Convert, BlakeTwo256, Block as BlockT, DigestFor, NumberFor, StaticLookup, }; use version::RuntimeVersion; use council::{motions as council_motions, voting as council_voting};