Fix clippy lints.

This commit is contained in:
Kris Nuttycombe 2022-10-19 18:32:28 -06:00
parent 06a1c78941
commit 16c49a844e
4 changed files with 5 additions and 5 deletions

View File

@ -186,8 +186,8 @@ impl Block {
mutated = true;
}
let mut inner_hasher = Sha256::new();
inner_hasher.update(&merkle_tree[j + i]);
inner_hasher.update(&merkle_tree[j + i2]);
inner_hasher.update(merkle_tree[j + i]);
inner_hasher.update(merkle_tree[j + i2]);
merkle_tree.push(Sha256::digest(&inner_hasher.finalize()));
i += 2;
}

View File

@ -171,7 +171,7 @@ pub extern "C" fn orchard_unauthorized_bundle_prove_and_sign(
let mut rng = OsRng;
let res = bundle
.create_proof(pk, &mut rng)
.and_then(|b| b.apply_signatures(&mut rng, *sighash, &signing_keys));
.and_then(|b| b.apply_signatures(rng, *sighash, &signing_keys));
match res {
Ok(signed) => Box::into_raw(Box::new(signed)),

View File

@ -17,7 +17,7 @@ use zcash_primitives::merkle_tree::{
pub fn write_checkpoint_v2<W: Write>(mut writer: W, checkpoint: &Checkpoint) -> io::Result<()> {
write_usize_leu64(&mut writer, checkpoint.bridges_len())?;
writer.write_u8(if checkpoint.is_witnessed() { 1 } else { 0 })?;
writer.write_u8(u8::from(checkpoint.is_witnessed()))?;
Vector::write_sized(&mut writer, checkpoint.witnessed().iter(), |w, p| {
write_position(w, *p)
})?;

View File

@ -28,7 +28,7 @@ pub extern "C" fn metrics_run(
}
};
// We always allow localhost.
allow_ips.extend(&["127.0.0.0/8", "::1/128"]);
allow_ips.extend(["127.0.0.0/8", "::1/128"]);
// Parse the address to bind to.
let bind_address = SocketAddr::new(