Change for loop to iter().for_each()

This commit is contained in:
Brian Lawrence
2024-10-04 14:02:05 -07:00
parent 970ec87b83
commit 08617fa6b3

View File

@@ -34,9 +34,8 @@ impl MessageTarget {
pub fn set_witness(&self, pw: &mut PartialWitness<GoldF>, msg: &Vec<GoldF>) -> Result<()> {
assert!(msg.len() == self.msg.len());
for (&t, &x) in self.msg.iter().zip(msg.iter()) {
pw.set_target(t, x)?;
}
self.msg.iter().zip(msg.iter())
.for_each(|(&t, &x)| {pw.set_target(t, x);});
Ok(())
}