Skip to content

Commit 8a26c8b

Browse files
committed
CI fixes
1 parent 456c01d commit 8a26c8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plonky2x/core/src/frontend/vars/array.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use plonky2::iop::challenger::RecursiveChallenger;
99
use plonky2::iop::target::Target;
1010
use serde::{Deserialize, Serialize};
1111

12-
use super::{BoolVariable, ByteVariable, CircuitVariable, ValueStream, Variable, VariableStream};
12+
use super::{ByteVariable, CircuitVariable, ValueStream, Variable, VariableStream};
1313
use crate::backend::circuit::PlonkParameters;
1414
use crate::frontend::builder::CircuitBuilder;
1515
use crate::frontend::hint::simple::hint::Hint;
@@ -264,12 +264,12 @@ impl<L: PlonkParameters<D>, const D: usize> CircuitBuilder<L, D> {
264264
let at_start_idx = self.is_equal(idx, start_idx);
265265
within_sub_array = self.select(at_start_idx, true_v, within_sub_array);
266266

267-
subarray_size = self.add(subarray_size, within_sub_array.variable);
268-
269267
// If at the end_idx, then set within_sub_array to false.
270268
let at_end_idx = self.is_equal(idx, end_idx);
271269
within_sub_array = self.select(at_end_idx, false_v, within_sub_array);
272270

271+
subarray_size = self.add(subarray_size, within_sub_array.variable);
272+
273273
// If within the subarray, multiply the current r by the challenge.
274274
let multiplier = self.select(within_sub_array, challenges[i], one);
275275
// For subarray[i], the multiplier should be r^i. i is the index within the subarray.

0 commit comments

Comments
 (0)