Fix clippy beta lints that are applicable given an MSRV of 1.60

This commit is contained in:
Kris Nuttycombe 2023-03-10 14:23:06 -07:00
parent 0bc40d8c70
commit cf526f59e2
4 changed files with 6 additions and 6 deletions

View File

@ -931,7 +931,7 @@ mod tests {
.unwrap()
.create_proof(&pk, &mut rng)
.unwrap()
.prepare(&mut rng, [0; 32])
.prepare(rng, [0; 32])
.finalize()
.unwrap();
assert_eq!(bundle.value_balance(), &(-5000))

View File

@ -119,7 +119,7 @@ impl CommitIvkChip {
// Check that nk = b_2 (5 bits) || c (240 bits) || d_0 (9 bits) || d_1 (1 bit)
let nk_decomposition_check = {
let two_pow_245 = pallas::Base::from(1 << 49).pow(&[5, 0, 0, 0]);
let two_pow_245 = pallas::Base::from(1 << 49).pow([5, 0, 0, 0]);
b_2.clone()
+ c.clone() * two_pow_5

View File

@ -380,14 +380,14 @@ pub mod testing {
prop_compose! {
/// Generate an arbitrary [`ValueSum`] in the range of valid Zcash values.
pub fn arb_value_sum()(value in VALUE_SUM_RANGE) -> ValueSum {
ValueSum(value as i128)
ValueSum(value)
}
}
prop_compose! {
/// Generate an arbitrary [`ValueSum`] in the range of valid Zcash values.
pub fn arb_value_sum_bounded(bound: NoteValue)(value in -(bound.0 as i128)..=(bound.0 as i128)) -> ValueSum {
ValueSum(value as i128)
ValueSum(value)
}
}

View File

@ -49,7 +49,7 @@ fn bundle_chain() {
let unauthorized = builder.build(&mut rng).unwrap();
let sighash = unauthorized.commitment().into();
let proven = unauthorized.create_proof(&pk, &mut rng).unwrap();
proven.apply_signatures(&mut rng, sighash, &[]).unwrap()
proven.apply_signatures(rng, sighash, &[]).unwrap()
};
// Verify the shielding bundle.
@ -92,7 +92,7 @@ fn bundle_chain() {
let sighash = unauthorized.commitment().into();
let proven = unauthorized.create_proof(&pk, &mut rng).unwrap();
proven
.apply_signatures(&mut rng, sighash, &[SpendAuthorizingKey::from(&sk)])
.apply_signatures(rng, sighash, &[SpendAuthorizingKey::from(&sk)])
.unwrap()
};