diff --git a/src/builder.rs b/src/builder.rs index 2b693d98..c082f1a6 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -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)?; diff --git a/src/note/commitment.rs b/src/note/commitment.rs index 4bdf00e0..07ff13cf 100644 --- a/src/note/commitment.rs +++ b/src/note/commitment.rs @@ -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() } } diff --git a/src/note_encryption.rs b/src/note_encryption.rs index 81876053..98df1b87 100644 --- a/src/note_encryption.rs +++ b/src/note_encryption.rs @@ -259,7 +259,7 @@ impl From<&Action> for CompactAction { fn from(action: &Action) -> 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(),