From 7f2b34bdcd7e4f5f7ec317d68ea5c3acd9d6be16 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:08:54 +0300 Subject: [PATCH] config: Add Debug Clone for common configs (#1542) * config: Add Debug Clone for common configs Signed-off-by: Alexandru Vasile * Add copy impl Signed-off-by: Alexandru Vasile * Add other traits Signed-off-by: Alexandru Vasile --------- Signed-off-by: Alexandru Vasile --- core/src/config/polkadot.rs | 3 +++ core/src/config/substrate.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/src/config/polkadot.rs b/core/src/config/polkadot.rs index 500ea80521..7f4e3a88f9 100644 --- a/core/src/config/polkadot.rs +++ b/core/src/config/polkadot.rs @@ -11,6 +11,9 @@ pub use crate::utils::{AccountId32, MultiAddress, MultiSignature}; pub use primitive_types::{H256, U256}; /// Default set of commonly used types by Polkadot nodes. +// Note: The trait implementations exist just to make life easier, +// but shouldn't strictly be necessary since users can't instantiate this type. +#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] pub enum PolkadotConfig {} impl Config for PolkadotConfig { diff --git a/core/src/config/substrate.rs b/core/src/config/substrate.rs index 9c7ff96e9e..ef71f5a54a 100644 --- a/core/src/config/substrate.rs +++ b/core/src/config/substrate.rs @@ -16,6 +16,9 @@ pub use primitive_types::{H256, U256}; /// Default set of commonly used types by Substrate runtimes. // Note: We only use this at the type level, so it should be impossible to // create an instance of it. +// The trait implementations exist just to make life easier, +// but shouldn't strictly be necessary since users can't instantiate this type. +#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] pub enum SubstrateConfig {} impl Config for SubstrateConfig {