Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykoren committed Jun 19, 2024
1 parent 1a166a2 commit 04023eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
9 changes: 2 additions & 7 deletions components/zcash_protocol/src/memo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions zcash_primitives/src/transaction/sighash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<SpendProof = GrothProofBytes, OutputProof = GrothProofBytes>,
A: Authorization<SaplingAuth = SA, TransparentAuth = TA>,
>(
tx: &TransactionData<A>,
signable_input: &SignableInput<'a>,
signable_input: &SignableInput<'_>,
txid_parts: &TxDigests<Blake2bHash>,
) -> SignatureHash {
SignatureHash(match tx.version {
Expand Down
2 changes: 1 addition & 1 deletion zcash_proofs/src/circuit/sprout/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04023eb

Please sign in to comment.