Skip to content

Simplify ZSA features - #41

Merged
ConstanceBeguier merged 5 commits into
zsa1from
clean_zsa_code
Jun 20, 2025
Merged

Simplify ZSA features#41
ConstanceBeguier merged 5 commits into
zsa1from
clean_zsa_code

Remove table_range_check_tag function

5737ffe
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Clippy (beta) succeeded Jun 19, 2025 in 4s

Clippy (beta)

274 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 274
Note 0
Help 0

Versions

  • rustc 1.88.0-beta.6 (f5534dad0 2025-06-13)
  • cargo 1.88.0-beta.6 (873a06493 2025-05-10)
  • clippy 0.1.88 (f5534dad0e 2025-06-13)

Annotations

Check warning on line 407 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

an array of `Range` that is only one element

warning: an array of `Range` that is only one element
   --> halo2_gadgets/src/utilities.rs:407:47
    |
407 |         decompose(pallas::Base::random(rng), &[0..255]);
    |                                               ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
    = note: `-W clippy::single-range-in-vec-init` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::single_range_in_vec_init)]`
help: if you wanted a `Vec` that contains the entire range, try
    |
407 -         decompose(pallas::Base::random(rng), &[0..255]);
407 +         decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
    |
help: if you wanted an array of len 255, try
    |
407 -         decompose(pallas::Base::random(rng), &[0..255]);
407 +         decompose(pallas::Base::random(rng), &[0; 255]);
    |

Check warning on line 127 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:127:23
    |
127 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 118 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:118:23
    |
118 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 103 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:103:23
    |
103 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 483 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:483:16
    |
483 |             || format!("2^(-{})", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
483 -             || format!("2^(-{})", num_bits),
483 +             || format!("2^(-{num_bits})"),
    |

Check warning on line 474 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:474:16
    |
474 |             || format!("element * 2^({}-{})", K, num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
474 -             || format!("element * 2^({}-{})", K, num_bits),
474 +             || format!("element * 2^({K}-{num_bits})"),
    |

Check warning on line 279 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:279:16
    |
279 |             || format!("Range check {:?} bits", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
279 -             || format!("Range check {:?} bits", num_bits),
279 +             || format!("Range check {num_bits:?} bits"),
    |

Check warning on line 256 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:256:16
    |
256 |             || format!("Range check {:?} bits", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
256 -             || format!("Range check {:?} bits", num_bits),
256 +             || format!("Range check {num_bits:?} bits"),
    |

Check warning on line 132 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:132:16
    |
132 |             || format!("{:?} words range check", num_words),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
132 -             || format!("{:?} words range check", num_words),
132 +             || format!("{num_words:?} words range check"),
    |

Check warning on line 56 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
  --> halo2_gadgets/src/utilities/lookup_range_check.rs:56:27
   |
56 |                 _phantom: PhantomData::default(),
   |                           ^^^^^^^^^^^-----------
   |                                      |
   |                                      help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 739 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_gadgets/src/sinsemilla.rs:739:44
    |
739 | ...                   .chain(right.into_iter()),
    |                              ^^^^^------------
    |                                   |
    |                                   help: consider removing the `.into_iter()`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/f5534dad0efb77ca3d0c48811ba21a6f6a19f2ab/library/core/src/iter/traits/iterator.rs:471:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 738 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_gadgets/src/sinsemilla.rs:738:44
    |
738 | ...                   .chain(left.into_iter())
    |                              ^^^^------------
    |                                  |
    |                                  help: consider removing the `.into_iter()`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/f5534dad0efb77ca3d0c48811ba21a6f6a19f2ab/library/core/src/iter/traits/iterator.rs:471:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-W clippy::useless-conversion` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`

Check warning on line 150 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/sinsemilla.rs:150:47
    |
150 |                         layouter.namespace(|| format!("message piece {}", i)),
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
150 -                         layouter.namespace(|| format!("message piece {}", i)),
150 +                         layouter.namespace(|| format!("message piece {i}")),
    |

Check warning on line 161 in halo2_gadgets/src/sinsemilla/merkle.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/sinsemilla/merkle.rs:161:39
    |
161 |                 layouter.namespace(|| format!("MerkleCRH({}, left, right)", l)),
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
161 -                 layouter.namespace(|| format!("MerkleCRH({}, left, right)", l)),
161 +                 layouter.namespace(|| format!("MerkleCRH({l}, left, right)")),
    |

Check warning on line 337 in halo2_gadgets/src/sinsemilla/merkle/chip.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/sinsemilla/merkle/chip.rs:337:28
    |
337 |                         || format!("l {}", l),
    |                            ^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
337 -                         || format!("l {}", l),
337 +                         || format!("l {l}"),
    |

Check warning on line 310 in halo2_gadgets/src/sinsemilla/merkle/chip.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/sinsemilla/merkle/chip.rs:310:35
    |
310 |             layouter.namespace(|| format!("hash at l = {}", l)),
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
310 -             layouter.namespace(|| format!("hash at l = {}", l)),
310 +             layouter.namespace(|| format!("hash at l = {l}")),
    |

Check warning on line 127 in halo2_gadgets/benches/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/benches/poseidon.rs:127:25
    |
127 |         val.pow_vartime(&[5])
    |                         ^^^^ help: change this to: `[5]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`

Check warning on line 92 in halo2_gadgets/benches/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> halo2_gadgets/benches/poseidon.rs:92:28
   |
92 |                         || format!("load message_{}", i),
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-W clippy::uninlined-format-args` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
   |
92 -                         || format!("load message_{}", i),
92 +                         || format!("load message_{i}"),
   |

Check warning on line 127 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:127:23
    |
127 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 118 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:118:23
    |
118 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 103 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:103:23
    |
103 |             _phantom: PhantomData::default(),
    |                       ^^^^^^^^^^^-----------
    |                                  |
    |                                  help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 483 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:483:16
    |
483 |             || format!("2^(-{})", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
483 -             || format!("2^(-{})", num_bits),
483 +             || format!("2^(-{num_bits})"),
    |

Check warning on line 474 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:474:16
    |
474 |             || format!("element * 2^({}-{})", K, num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
474 -             || format!("element * 2^({}-{})", K, num_bits),
474 +             || format!("element * 2^({K}-{num_bits})"),
    |

Check warning on line 279 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:279:16
    |
279 |             || format!("Range check {:?} bits", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
279 -             || format!("Range check {:?} bits", num_bits),
279 +             || format!("Range check {num_bits:?} bits"),
    |

Check warning on line 256 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:256:16
    |
256 |             || format!("Range check {:?} bits", num_bits),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
256 -             || format!("Range check {:?} bits", num_bits),
256 +             || format!("Range check {num_bits:?} bits"),
    |