Address various clippy warnings/errors in zcash_primitives

This commit is contained in:
Jack Grigg
2019-08-02 11:25:00 +01:00
parent d65fe2cda9
commit 3a8efd9e67
18 changed files with 97 additions and 107 deletions

View File

@@ -486,8 +486,10 @@ impl<Node: Hashable> CommitmentTreeWitness<Node> {
// Given the position, let's finish constructing the authentication
// path
let mut tmp = position;
for i in 0..depth {
auth_path[i].as_mut().map(|p| p.1 = (tmp & 1) == 1);
for entry in auth_path.iter_mut() {
if let Some(p) = entry {
p.1 = (tmp & 1) == 1;
}
tmp >>= 1;
}