Skip to content

Commit

Permalink
fix all clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2 committed Aug 28, 2024
1 parent 9a6f496 commit f73f286
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions zcash_client_memory/src/types/notes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ impl ReceivedNote {
..
} => Ok(ReceivedNote {
note_id: NoteId::new(txid, Orchard, output.output_index() as u16),
txid: txid,
txid,
_output_index: output.output_index() as u32,
account_id: *receiving_account,
_note: Note::Orchard(note.clone()),
_note: Note::Orchard(*note),
nf: None,
_is_change: true,
_memo: output.memo().map(|m| Memo::try_from(m).unwrap()).unwrap(),
Expand Down Expand Up @@ -142,7 +142,7 @@ impl ReceivedNote {
txid: *note_id.txid(),
_output_index: output.index() as u32,
account_id: *output.account_id(),
_note: Note::Orchard(output.note().clone()),
_note: Note::Orchard(*output.note()),
nf: output.nf().map(|nf| Nullifier::Orchard(*nf)),
_is_change: output.is_change(),
_memo: Memo::Empty,
Expand Down
8 changes: 4 additions & 4 deletions zcash_client_memory/src/wallet_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ impl WalletWrite for MemoryWalletDb {
// we previously scanned.
let spent_in = output
.nf()
.and_then(|nf| self.nullifiers.get(&&Nullifier::Orchard(*nf)))
.and_then(|nf| self.nullifiers.get(&Nullifier::Orchard(*nf)))
.and_then(|(height, tx_idx)| self.tx_locator.get(*height, *tx_idx))
.map(|x| *x);
.copied();

self.insert_received_orchard_note(note_id, &output, spent_in)
self.insert_received_orchard_note(note_id, output, spent_in)
}
// Add frontier to the sapling tree
self.sapling_tree.insert_frontier(
Expand All @@ -182,7 +182,7 @@ impl WalletWrite for MemoryWalletDb {
id: from_state.block_height(),
marking: Marking::Reference,
},
);
)?;
last_scanned_height = Some(block.height());
transactions.insert(txid, transaction.clone());
}
Expand Down

0 comments on commit f73f286

Please sign in to comment.