Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Get rid of unnecessary clone. (#5685)
Browse files Browse the repository at this point in the history
  • Loading branch information
eskimor authored and al3mart committed Jul 14, 2022
1 parent 20b594b commit cde56dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions node/core/dispute-coordinator/src/initialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
Expand All @@ -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(),
);
Expand Down
4 changes: 2 additions & 2 deletions primitives/src/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit cde56dd

Please sign in to comment.