Skip to content

Commit

Permalink
refactor: fix clippy never loop (#3110)
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero authored Sep 27, 2023
1 parent 17eed1d commit 4522c3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/core/transaction/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ impl Transaction {
return Err(anyhow::anyhow!("no memo"));
}

// Iterate through the outputs until we find an output that lets us decrypt the memo.
for output in self.outputs() {
// Any output will let us decrypt the memo.
if let Some(output) = self.outputs().next() {
// First decrypt the wrapped memo key on the output.
let ovk_wrapped_key = output.body.ovk_wrapped_key.clone();
let shared_secret = Note::decrypt_key(
Expand Down Expand Up @@ -145,7 +145,7 @@ impl Transaction {
return Ok(decrypted_memo);
}

// If we got here, we were unable to find an output to decrypt the memo.
// If we got here, we were unable to decrypt the memo.
Err(anyhow::anyhow!("unable to decrypt memo"))
}

Expand Down

0 comments on commit 4522c3e

Please sign in to comment.