diff --git a/components/zcash_protocol/src/memo.rs b/components/zcash_protocol/src/memo.rs index dafb1bcbe1..10258a52d9 100644 --- a/components/zcash_protocol/src/memo.rs +++ b/components/zcash_protocol/src/memo.rs @@ -144,9 +144,10 @@ impl Deref for TextMemo { } /// An unencrypted memo received alongside a shielded note in a Zcash transaction. -#[derive(Clone)] +#[derive(Clone, Default)] pub enum Memo { /// An empty memo field. + #[default] Empty, /// A memo field containing a UTF-8 string. Text(TextMemo), @@ -171,12 +172,6 @@ impl fmt::Debug for Memo { } } -impl Default for Memo { - fn default() -> Self { - Memo::Empty - } -} - impl PartialEq for Memo { fn eq(&self, rhs: &Memo) -> bool { match (self, rhs) { diff --git a/zcash_primitives/src/transaction/sighash.rs b/zcash_primitives/src/transaction/sighash.rs index 702ed17575..4be0a7454b 100644 --- a/zcash_primitives/src/transaction/sighash.rs +++ b/zcash_primitives/src/transaction/sighash.rs @@ -76,13 +76,12 @@ pub trait TransparentAuthorizingContext: transparent::Authorization { /// set of precomputed hashes produced in the construction of the /// transaction ID. pub fn signature_hash< - 'a, TA: TransparentAuthorizingContext, SA: sapling::bundle::Authorization, A: Authorization, >( tx: &TransactionData, - signable_input: &SignableInput<'a>, + signable_input: &SignableInput<'_>, txid_parts: &TxDigests, ) -> SignatureHash { SignatureHash(match tx.version { diff --git a/zcash_proofs/src/circuit/sprout/input.rs b/zcash_proofs/src/circuit/sprout/input.rs index 39a2d4170a..cadcfcbd8c 100644 --- a/zcash_proofs/src/circuit/sprout/input.rs +++ b/zcash_proofs/src/circuit/sprout/input.rs @@ -66,7 +66,7 @@ impl InputNote { let lhs = cur; let rhs = witness_u256( cs.namespace(|| "sibling"), - layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), + layer.as_ref().map(|(sibling, _)| &sibling[..]), )?; // Conditionally swap if cur is right