Skip to content

Commit

Permalink
nit: to_signable_vec under vote.rs takes self and avoid clone
Browse files Browse the repository at this point in the history
Co-authored-by: Mikhail Zabaluev <mikhail@informal.systems>
  • Loading branch information
Farhad-Shabani and mzabaluev authored Jul 18, 2023
1 parent a3540ae commit 81b02b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tendermint/src/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ impl Vote {
}

/// Create signable vector from Vote.
pub fn to_signable_vec(&self, chain_id: ChainId) -> Vec<u8> {
let canonical = CanonicalVote::new(self.clone(), chain_id);
pub fn into_signable_vec(self, chain_id: ChainId) -> Vec<u8> {
let canonical = CanonicalVote::new(self, chain_id);
Protobuf::<RawCanonicalVote>::encode_length_delimited_vec(canonical)
}

Expand Down

0 comments on commit 81b02b3

Please sign in to comment.