Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker authored and ma2bd committed Aug 26, 2020
1 parent f06d990 commit 2ae3b03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust/fastpay_core/src/base_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl From<SequenceNumber> for usize {
}

pub trait Digestible {
fn digest(self: &Self) -> [u8; 32];
fn digest(&self) -> [u8; 32];
}

impl Digestible for [u8; 5] {
Expand Down
4 changes: 2 additions & 2 deletions rust/fastpay_core/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl<'a> SignatureAggregator<'a> {
!self.used_authorities.contains(&authority),
FastPayError::CertificateAuthorityReuse
);
self.used_authorities.insert(authority.clone());
self.used_authorities.insert(authority);
// Update weight.
let voting_rights = self.committee.weight(&authority);
fp_ensure!(voting_rights > 0, FastPayError::UnknownSigner);
Expand Down Expand Up @@ -296,7 +296,7 @@ impl CertifiedTransferOrder {
!used_authorities.contains(authority),
FastPayError::CertificateAuthorityReuse
);
used_authorities.insert(authority.clone());
used_authorities.insert(*authority);
// Update weight.
let voting_rights = committee.weight(authority);
fp_ensure!(voting_rights > 0, FastPayError::UnknownSigner);
Expand Down
2 changes: 1 addition & 1 deletion rust/fastpay_core/src/unit_tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl AuthorityClient for LocalAuthorityClient {
.lock()
.await
.handle_confirmation_order(order)
.and_then(|(info, _)| Ok(info))
.map(|(info, _)| info)
})
}

Expand Down

0 comments on commit 2ae3b03

Please sign in to comment.