mirror of https://github.com/zcash/orchard.git
Fix clippy beta lints that are applicable given an MSRV of 1.60
This commit is contained in:
parent
0bc40d8c70
commit
cf526f59e2
|
@ -931,7 +931,7 @@ mod tests {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.create_proof(&pk, &mut rng)
|
.create_proof(&pk, &mut rng)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.prepare(&mut rng, [0; 32])
|
.prepare(rng, [0; 32])
|
||||||
.finalize()
|
.finalize()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(bundle.value_balance(), &(-5000))
|
assert_eq!(bundle.value_balance(), &(-5000))
|
||||||
|
|
|
@ -119,7 +119,7 @@ impl CommitIvkChip {
|
||||||
|
|
||||||
// Check that nk = b_2 (5 bits) || c (240 bits) || d_0 (9 bits) || d_1 (1 bit)
|
// Check that nk = b_2 (5 bits) || c (240 bits) || d_0 (9 bits) || d_1 (1 bit)
|
||||||
let nk_decomposition_check = {
|
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()
|
b_2.clone()
|
||||||
+ c.clone() * two_pow_5
|
+ c.clone() * two_pow_5
|
||||||
|
|
|
@ -380,14 +380,14 @@ pub mod testing {
|
||||||
prop_compose! {
|
prop_compose! {
|
||||||
/// Generate an arbitrary [`ValueSum`] in the range of valid Zcash values.
|
/// Generate an arbitrary [`ValueSum`] in the range of valid Zcash values.
|
||||||
pub fn arb_value_sum()(value in VALUE_SUM_RANGE) -> ValueSum {
|
pub fn arb_value_sum()(value in VALUE_SUM_RANGE) -> ValueSum {
|
||||||
ValueSum(value as i128)
|
ValueSum(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prop_compose! {
|
prop_compose! {
|
||||||
/// Generate an arbitrary [`ValueSum`] in the range of valid Zcash values.
|
/// 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 {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ fn bundle_chain() {
|
||||||
let unauthorized = builder.build(&mut rng).unwrap();
|
let unauthorized = builder.build(&mut rng).unwrap();
|
||||||
let sighash = unauthorized.commitment().into();
|
let sighash = unauthorized.commitment().into();
|
||||||
let proven = unauthorized.create_proof(&pk, &mut rng).unwrap();
|
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.
|
// Verify the shielding bundle.
|
||||||
|
@ -92,7 +92,7 @@ fn bundle_chain() {
|
||||||
let sighash = unauthorized.commitment().into();
|
let sighash = unauthorized.commitment().into();
|
||||||
let proven = unauthorized.create_proof(&pk, &mut rng).unwrap();
|
let proven = unauthorized.create_proof(&pk, &mut rng).unwrap();
|
||||||
proven
|
proven
|
||||||
.apply_signatures(&mut rng, sighash, &[SpendAuthorizingKey::from(&sk)])
|
.apply_signatures(rng, sighash, &[SpendAuthorizingKey::from(&sk)])
|
||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue