Get rid of unnecessary clone. (#5685)

This commit is contained in:
Robert Klotzner
2022-06-16 21:15:20 +02:00
committed by GitHub
parent e58032e2e0
commit 1dc991374b
2 changed files with 5 additions and 5 deletions
@@ -740,11 +740,11 @@ impl Initialized {
continue
}
match statement.statement().clone() {
match statement.statement() {
DisputeStatement::Valid(valid_kind) => {
let fresh = insert_into_statement_vec(
&mut votes.valid,
valid_kind,
*valid_kind,
*val_index,
statement.validator_signature().clone(),
);
@@ -759,7 +759,7 @@ impl Initialized {
DisputeStatement::Invalid(invalid_kind) => {
let fresh = insert_into_statement_vec(
&mut votes.invalid,
invalid_kind,
*invalid_kind,
*val_index,
statement.validator_signature().clone(),
);
+2 -2
View File
@@ -1290,7 +1290,7 @@ impl DisputeStatement {
}
/// Different kinds of statements of validity on a candidate.
#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(MallocSizeOf))]
pub enum ValidDisputeStatementKind {
/// An explicit statement issued as part of a dispute.
@@ -1308,7 +1308,7 @@ pub enum ValidDisputeStatementKind {
}
/// Different kinds of statements of invalidity on a candidate.
#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(MallocSizeOf))]
pub enum InvalidDisputeStatementKind {
/// An explicit statement issued as part of a dispute.