mirror of
https://github.com/arnaucube/schnorr.git
synced 2026-01-12 08:51:33 +01:00
Change for loop to iter().for_each()
This commit is contained in:
@@ -34,9 +34,8 @@ impl MessageTarget {
|
|||||||
|
|
||||||
pub fn set_witness(&self, pw: &mut PartialWitness<GoldF>, msg: &Vec<GoldF>) -> Result<()> {
|
pub fn set_witness(&self, pw: &mut PartialWitness<GoldF>, msg: &Vec<GoldF>) -> Result<()> {
|
||||||
assert!(msg.len() == self.msg.len());
|
assert!(msg.len() == self.msg.len());
|
||||||
for (&t, &x) in self.msg.iter().zip(msg.iter()) {
|
self.msg.iter().zip(msg.iter())
|
||||||
pw.set_target(t, x)?;
|
.for_each(|(&t, &x)| {pw.set_target(t, x);});
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user