Skip to content

Commit

Permalink
Fix clippy complaints.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Dec 10, 2024
1 parent bcd08e1 commit c276fd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/pczt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,17 @@ mod tests {

// Run the IO Finalizer role.
let sighash = [0; 32];
pczt_bundle.finalize_io(sighash, &mut rng).unwrap();
pczt_bundle.finalize_io(sighash, rng).unwrap();

// Run the Prover role.
pczt_bundle.create_proof(&pk, &mut rng).unwrap();
pczt_bundle.create_proof(&pk, rng).unwrap();

// Run the Transaction Extractor role.
let bundle = pczt_bundle.extract::<i64>().unwrap().unwrap();

assert_eq!(bundle.value_balance(), &(-5000));
// We can successfully bind the bundle.
bundle.apply_binding_signature(sighash, &mut rng).unwrap();
bundle.apply_binding_signature(sighash, rng).unwrap();
}

#[test]
Expand Down Expand Up @@ -405,7 +405,7 @@ mod tests {

// Run the IO Finalizer role.
let sighash = [0; 32];
pczt_bundle.finalize_io(sighash, &mut rng).unwrap();
pczt_bundle.finalize_io(sighash, rng).unwrap();

// Run the Updater role.
for action in pczt_bundle.actions_mut() {
Expand All @@ -418,15 +418,15 @@ mod tests {
}

// Run the Prover role.
pczt_bundle.create_proof(&pk, &mut rng).unwrap();
pczt_bundle.create_proof(&pk, rng).unwrap();

// TODO: Verify that the PCZT contains sufficient information to decrypt and check
// `enc_ciphertext`.

// Run the Signer role.
for action in pczt_bundle.actions_mut() {
if action.spend.zip32_derivation.as_ref() == Some(&zip32_derivation) {
action.sign(sighash, &ask, &mut rng).unwrap();
action.sign(sighash, &ask, rng).unwrap();
}
}

Expand All @@ -435,6 +435,6 @@ mod tests {

assert_eq!(bundle.value_balance(), &0);
// We can successfully bind the bundle.
bundle.apply_binding_signature(sighash, &mut rng).unwrap();
bundle.apply_binding_signature(sighash, rng).unwrap();
}
}
2 changes: 1 addition & 1 deletion src/pczt/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Updater<'a>(&'a mut Bundle);
impl<'a> Updater<'a> {
/// Provides read access to the bundle being updated.
pub fn bundle(&self) -> &Bundle {
&self.0
self.0
}

/// Updates the action at the given index with information provided in the given
Expand Down

0 comments on commit c276fd6

Please sign in to comment.