From fe9ec4b3b31fdc787e2a07466755042ff0287218 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 17 Aug 2020 20:26:17 +0200 Subject: [PATCH] Derive Clone for AlwaysCanAuthor, NeverCanAuthor, CanAuthorWithNativeVersion --- primitives/consensus/common/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/primitives/consensus/common/src/lib.rs b/primitives/consensus/common/src/lib.rs index 0e4dd91dd497e..fa4f233c680fa 100644 --- a/primitives/consensus/common/src/lib.rs +++ b/primitives/consensus/common/src/lib.rs @@ -212,6 +212,7 @@ pub trait CanAuthorWith { /// Checks if the node can author blocks by using /// [`NativeVersion::can_author_with`](sp_version::NativeVersion::can_author_with). +#[derive(Clone)] pub struct CanAuthorWithNativeVersion(T); impl CanAuthorWithNativeVersion { @@ -239,6 +240,7 @@ impl, Block: BlockT> CanAuthorWith CanAuthorWith for AlwaysCanAuthor { @@ -248,6 +250,7 @@ impl CanAuthorWith for AlwaysCanAuthor { } /// Never can author. +#[derive(Clone)] pub struct NeverCanAuthor; impl CanAuthorWith for NeverCanAuthor {