Skip to content

Commit dd27cff

Browse files
committed
lint
1 parent 717fe00 commit dd27cff

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

circuit/src/allocator.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ impl<T: Clone + Unit> VarAllocator<T> {
5959
#[must_use]
6060
pub fn allocate_vars<const N: usize>(&self) -> [FieldVar; N] {
6161
let mut buf = [FieldVar::default(); N];
62-
for x in buf.iter_mut() { *x = self.new_field_var() };
62+
for x in &mut buf {
63+
*x = self.new_field_var();
64+
}
6365
buf
6466
}
6567

circuit/src/permutation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ pub struct PermutationInstanceBuilder<T, const WIDTH: usize> {
1414
constraints: Arc<RwLock<PermutationInstance<WIDTH>>>,
1515
}
1616

17+
type QueryAnswerPair<U, const WIDTH: usize> = ([U; WIDTH], [U; WIDTH]);
18+
1719
#[derive(Clone)]
1820
pub struct PermutationWitnessBuilder<P: Permutation<WIDTH>, const WIDTH: usize> {
19-
trace: Arc<RwLock<Vec<([P::U; WIDTH], [P::U; WIDTH])>>>,
21+
trace: Arc<RwLock<Vec<QueryAnswerPair<P::U, WIDTH>>>>,
2022
permutation: P,
2123
}
2224

@@ -119,7 +121,7 @@ impl<P: Permutation<WIDTH>, const WIDTH: usize> PermutationWitnessBuilder<P, WID
119121
}
120122

121123
#[must_use]
122-
pub fn trace(&self) -> impl AsRef<[([P::U; WIDTH], [P::U; WIDTH])]> {
124+
pub fn trace(&self) -> impl AsRef<[QueryAnswerPair<P::U, WIDTH>]> {
123125
self.trace.read().clone()
124126
}
125127
}

0 commit comments

Comments
 (0)