Fix clippy lints.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2021-06-16 19:12:07 +01:00
parent 37b1b7f357
commit 1c19bea842
3 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ impl Builder {
// Create the proof.
let instances: Vec<_> = actions
.iter()
.map(|a| a.to_instance(flags, anchor.clone()))
.map(|a| a.to_instance(flags, anchor))
.collect();
let proof = Proof::create(pk, &circuits, &instances)?;

View File

@ -53,7 +53,7 @@ impl ExtractedNoteCommitment {
}
/// Serialize the value commitment to its canonical byte representation.
pub fn to_bytes(&self) -> [u8; 32] {
pub fn to_bytes(self) -> [u8; 32] {
self.0.to_bytes()
}
}

View File

@ -259,7 +259,7 @@ impl<T> From<&Action<T>> for CompactAction {
fn from(action: &Action<T>) -> Self {
CompactAction {
ephemeral_key: action.ephemeral_key(),
cmx: action.cmx().clone(),
cmx: *action.cmx(),
enc_ciphertext: action.encrypted_note().enc_ciphertext[..52]
.try_into()
.unwrap(),