Merge pull request #846 from zcash/bugfix #997
Clippy (beta)
280 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 280 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.89.0-beta.3 (b5e10d8c0 2025-07-02)
- cargo 1.89.0-beta.3 (c24e10642 2025-06-23)
- clippy 0.1.89 (b5e10d8c00 2025-07-02)
Annotations
Check warning on line 407 in halo2_gadgets/src/utilities.rs
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
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
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
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 435 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:435:16
|
435 | || 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
|
435 - || format!("2^(-{})", num_bits),
435 + || format!("2^(-{num_bits})"),
|
Check warning on line 426 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:426:16
|
426 | || 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
|
426 - || format!("element * 2^({}-{})", K, num_bits),
426 + || format!("element * 2^({K}-{num_bits})"),
|
Check warning on line 272 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:272:16
|
272 | || 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
|
272 - || format!("Range check {:?} bits", num_bits),
272 + || format!("Range check {num_bits:?} bits"),
|
Check warning on line 249 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:249:16
|
249 | || 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
|
249 - || format!("Range check {:?} bits", num_bits),
249 + || format!("Range check {num_bits:?} bits"),
|
Check warning on line 125 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:125:16
|
125 | || 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
|
125 - || format!("{:?} words range check", num_words),
125 + || format!("{num_words:?} words range check"),
|
Check warning on line 56 in halo2_gadgets/src/utilities/lookup_range_check.rs
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 675 in halo2_gadgets/src/sinsemilla.rs
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:675:48
|
675 | ... .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/b5e10d8c000a153cae6a14d70372dc4b39439a3f/library/core/src/iter/traits/iterator.rs:497:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 674 in halo2_gadgets/src/sinsemilla.rs
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:674:48
|
674 | ... .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/b5e10d8c000a153cae6a14d70372dc4b39439a3f/library/core/src/iter/traits/iterator.rs:497: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 136 in halo2_gadgets/src/sinsemilla.rs
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:136:47
|
136 | 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
|
136 - layouter.namespace(|| format!("message piece {}", i)),
136 + layouter.namespace(|| format!("message piece {i}")),
|
Check warning on line 161 in halo2_gadgets/src/sinsemilla/merkle.rs
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 336 in halo2_gadgets/src/sinsemilla/merkle/chip.rs
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:336:28
|
336 | || 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
|
336 - || format!("l {}", l),
336 + || format!("l {l}"),
|
Check warning on line 309 in halo2_gadgets/src/sinsemilla/merkle/chip.rs
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:309:35
|
309 | 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
|
309 - layouter.namespace(|| format!("hash at l = {}", l)),
309 + layouter.namespace(|| format!("hash at l = {l}")),
|
Check warning on line 450 in halo2_gadgets/src/sha256/table16/spread_table.rs
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/sha256/table16/spread_table.rs:450:23
|
450 | Err(e) => panic!("{:?}", e),
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
450 - Err(e) => panic!("{:?}", e),
450 + Err(e) => panic!("{e:?}"),
|
Check warning on line 451 in halo2_gadgets/src/sha256/table16/message_schedule.rs
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/sha256/table16/message_schedule.rs:451:23
|
451 | Err(e) => panic!("{:?}", e),
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
451 - Err(e) => panic!("{:?}", e),
451 + Err(e) => panic!("{e:?}"),
|
Check warning on line 177 in halo2_gadgets/src/sha256/table16/message_schedule/subregion3.rs
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/sha256/table16/message_schedule/subregion3.rs:177:20
|
177 | || format!("carry_{}", new_word_idx),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
177 - || format!("carry_{}", new_word_idx),
177 + || format!("carry_{new_word_idx}"),
|
Check warning on line 171 in halo2_gadgets/src/sha256/table16/message_schedule/subregion3.rs
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/sha256/table16/message_schedule/subregion3.rs:171:20
|
171 | || format!("W_{}", new_word_idx),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
171 - || format!("W_{}", new_word_idx),
171 + || format!("W_{new_word_idx}"),
|
Check warning on line 261 in halo2_gadgets/src/sha256/table16/message_schedule/subregion2.rs
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/sha256/table16/message_schedule/subregion2.rs:261:20
|
261 | || format!("carry_{}", new_word_idx),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
261 - || format!("carry_{}", new_word_idx),
261 + || format!("carry_{new_word_idx}"),
|
Check warning on line 255 in halo2_gadgets/src/sha256/table16/message_schedule/subregion2.rs
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/sha256/table16/message_schedule/subregion2.rs:255:20
|
255 | || format!("W_{}", new_word_idx),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
255 - || format!("W_{}", new_word_idx),
255 + || format!("W_{new_word_idx}"),
|
Check warning on line 173 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
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/sha256/table16/message_schedule/schedule_util.rs:173:16
|
173 | || format!("W_{}", word_idx),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
173 - || format!("W_{}", word_idx),
173 + || format!("W_{word_idx}"),
|
Check warning on line 168 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
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/sha256/table16/message_schedule/schedule_util.rs:168:51
|
168 | AssignedBits::<16>::assign(region, || format!("W_{}_hi", word_idx), a_4, row, w_hi_val)?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
168 - AssignedBits::<16>::assign(region, || format!("W_{}_hi", word_idx), a_4, row, w_hi_val)?
168 + AssignedBits::<16>::assign(region, || format!("W_{word_idx}_hi"), a_4, row, w_hi_val)?
|
Check warning on line 164 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
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/sha256/table16/message_schedule/schedule_util.rs:164:51
|
164 | AssignedBits::<16>::assign(region, || format!("W_{}_lo", word_idx), a_3, row, w_lo_val)?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
164 - AssignedBits::<16>::assign(region, || format!("W_{}_lo", word_idx), a_3, row, w_lo_val)?
164 + AssignedBits::<16>::assign(region, || format!("W_{word_idx}_lo"), a_3, row, w_lo_val)?
|