mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-12 00:41:32 +01:00
Remove a few unnecessary .into_iter() explicit calls, and some cloning.
See https://rust-lang.github.io/rust-clippy/master/#explicit_into_iter_loop
This commit is contained in:
committed by
Pratyush Mishra
parent
581f3df55f
commit
10c6e85c1a
@@ -217,7 +217,7 @@ pub trait FieldGadget<F: Field, ConstraintF: Field>:
|
||||
bits: &[Boolean],
|
||||
) -> Result<Self, SynthesisError> {
|
||||
let mut res = Self::one(cs.ns(|| "Alloc result"))?;
|
||||
for (i, bit) in bits.into_iter().enumerate() {
|
||||
for (i, bit) in bits.iter().enumerate() {
|
||||
res = res.square(cs.ns(|| format!("Double {}", i)))?;
|
||||
let tmp = res.mul(cs.ns(|| format!("Add {}-th base power", i)), self)?;
|
||||
res = Self::conditionally_select(
|
||||
|
||||
Reference in New Issue
Block a user