Use built-in iteration functions more

This commit is contained in:
François Garillot
2019-12-02 07:28:49 -08:00
committed by Pratyush Mishra
parent c42c7dd98a
commit 53a51eb4dc
5 changed files with 6 additions and 9 deletions

View File

@@ -144,9 +144,9 @@ impl<G: Group, W: PedersenWindow> FixedLengthCRH for BoweHopwoodPedersenCRH<G, W
}
encoded
})
.reduce(|| G::zero(), |a, b| a + &b)
.reduce(G::zero, |a, b| a + &b)
})
.reduce(|| G::zero(), |a, b| a + &b);
.reduce(G::zero, |a, b| a + &b);
end_timer!(eval_time);
Ok(result)

View File

@@ -111,7 +111,7 @@ impl<G: Group, W: PedersenWindow> FixedLengthCRH for PedersenCRH<G, W> {
}
encoded
})
.reduce(|| G::zero(), |a, b| a + &b);
.reduce(G::zero, |a, b| a + &b);
end_timer!(eval_time);
Ok(result)