Skip to content

Merge pull request #837 from wowinter13/feat/improve_mock_provider_docs #4099

Merge pull request #837 from wowinter13/feat/improve_mock_provider_docs

Merge pull request #837 from wowinter13/feat/improve_mock_provider_docs #4099

GitHub Actions / Clippy (beta) succeeded Jun 12, 2025 in 4s

Clippy (beta)

281 warnings

Details

Results

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

Versions

  • rustc 1.88.0-beta.5 (645b44edd 2025-06-01)
  • cargo 1.88.0-beta.5 (873a06493 2025-05-10)
  • clippy 0.1.88 (645b44edd3 2025-06-01)

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 435 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: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

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: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

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: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

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: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

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: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

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 675 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: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/645b44edd3717f02838d07ba9bdd2554b0cdc0c5/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 674 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: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/645b44edd3717f02838d07ba9bdd2554b0cdc0c5/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 136 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: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

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 336 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: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

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: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

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/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

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/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 1071 in halo2_proofs/src/dev.rs

See this annotation in the file changed.

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

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
    --> halo2_proofs/src/dev.rs:1071:30
     |
1071 | ...                   .fold(Ok(()), |acc, res| acc.and(res))
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold((), |acc, res| ...)`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
     = note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
     = help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`

Check warning on line 177 in halo2_gadgets/src/sha256/table16/message_schedule/subregion3.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/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

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/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 693 in halo2_proofs/src/dev.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_proofs/src/dev.rs:688:41
    |
688 | / ...                   &util::load_instance(
689 | | ...                       n,
690 | | ...                       row,
691 | | ...                       &self.cs.instance_queries,
692 | | ...                       &self.instance,
693 | | ...                   ),
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
688 ~                                         util::load_instance(
689 +                                             n,
690 +                                             row,
691 +                                             &self.cs.instance_queries,
692 +                                             &self.instance,
693 ~                                         ),
    |

Check warning on line 687 in halo2_proofs/src/dev.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_proofs/src/dev.rs:687:41
    |
687 | ...                   &util::load(n, row, &self.cs.advice_queries, &self.advice),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `util::load(n, row, &self.cs.advice_queries, &self.advice)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 686 in halo2_proofs/src/dev.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_proofs/src/dev.rs:686:41
    |
686 | ...                   &util::load(n, row, &self.cs.fixed_queries, &self.fixed),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `util::load(n, row, &self.cs.fixed_queries, &self.fixed)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 261 in halo2_gadgets/src/sha256/table16/message_schedule/subregion2.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/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}"),
    |