Skip to content

Commit 567a6d8

Browse files
committed
lint
1 parent 717fe00 commit 567a6d8

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
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
}

spongefish/tests/derive_generics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fn codec_derive_handles_generic_types() {
2727
assert_eq!(roundtrip.value, tagged.value);
2828
assert!(buf.is_empty());
2929

30+
#[allow(clippy::items_after_statements)]
3031
fn assert_codec<T: Codec>(_: &T) {}
3132
assert_codec(&tagged);
3233
}

spongefish/tests/test_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn test_all_duplex_sponge_vectors() {
128128
.filter(|(_, test_vector)| test_vector.hash_function == "SHAKE128")
129129
.map(|(name, test_vector)| {
130130
Trial::test(
131-
format!("tests::spec::test_duplex_sponge::{}", name),
131+
format!("tests::spec::test_duplex_sponge::{name}"),
132132
move || run_test_vector(&name, &test_vector),
133133
)
134134
})

0 commit comments

Comments
 (0)