Skip to content
GitHub Actions / Clippy (beta) succeeded Jan 4, 2024 in 1s

Clippy (beta)

59 warnings

Details

Results

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

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check warning on line 153 in halo2_proofs/src/helpers.rs

See this annotation in the file changed.

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

accessing first element with `slice.get(0)`

warning: accessing first element with `slice.get(0)`
   --> halo2_proofs/src/helpers.rs:153:40
    |
153 |     4 + slice.len() * (4 + field_len * slice.get(0).map(|poly| poly.len()).unwrap_or(0))
    |                                        ^^^^^^^^^^^^ help: try: `slice.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first

Check warning on line 611 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> halo2_proofs/tests/frontend_backend_split.rs:611:40
    |
611 |     let strategy = SingleStrategy::new(&verifier_params);
    |                                        ^^^^^^^^^^^^^^^^ help: change this to: `verifier_params`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 535 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> halo2_proofs/tests/frontend_backend_split.rs:535:40
    |
535 |     let strategy = SingleStrategy::new(&verifier_params);
    |                                        ^^^^^^^^^^^^^^^^ help: change this to: `verifier_params`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 191 in halo2_proofs/tests/frontend_backend_split.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_proofs/tests/frontend_backend_split.rs:191:33
    |
191 |             lhs.into_iter().zip(rhs.into_iter()).collect()
    |                                 ^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `rhs`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 181 in halo2_proofs/tests/frontend_backend_split.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_proofs/tests/frontend_backend_split.rs:181:33
    |
181 |             lhs.into_iter().zip(rhs.into_iter()).collect()
    |                                 ^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `rhs`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643: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 69 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> halo2_proofs/tests/frontend_backend_split.rs:69:10
   |
69 |     ) -> Result<(AssignedCell<F, F>, [AssignedCell<F, F>; 4]), Error> {
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `-W clippy::type-complexity` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`

Check warning on line 430 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused variable: `instance`

warning: unused variable: `instance`
   --> halo2_proofs/tests/frontend_backend_split.rs:430:29
    |
430 |                     for (i, instance) in instance_copy.iter().enumerate() {
    |                             ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_instance`

Check warning on line 430 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused variable: `i`

warning: unused variable: `i`
   --> halo2_proofs/tests/frontend_backend_split.rs:430:26
    |
430 |                     for (i, instance) in instance_copy.iter().enumerate() {
    |                          ^ help: if this is intentional, prefix it with an underscore: `_i`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 23 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `EncodedChallenge`

warning: unused import: `EncodedChallenge`
  --> halo2_proofs/tests/frontend_backend_split.rs:23:46
   |
23 |     Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer,
   |                                              ^^^^^^^^^^^^^^^^

Check warning on line 21 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `halo2_proofs::poly::VerificationStrategy`

warning: unused import: `halo2_proofs::poly::VerificationStrategy`
  --> halo2_proofs/tests/frontend_backend_split.rs:21:5
   |
21 | use halo2_proofs::poly::VerificationStrategy;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 19 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Verifier`

warning: unused import: `Verifier`
  --> halo2_proofs/tests/frontend_backend_split.rs:19:78
   |
19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                                                              ^^^^^^^^

Check warning on line 19 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Prover`

warning: unused import: `Prover`
  --> halo2_proofs/tests/frontend_backend_split.rs:19:70
   |
19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                                                      ^^^^^^

Check warning on line 445 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `ParamsVerifierKZG`

warning: unused import: `ParamsVerifierKZG`
   --> halo2_proofs/tests/frontend_backend_split.rs:445:75
    |
445 | use halo2_proofs::poly::kzg::commitment::{KZGCommitmentScheme, ParamsKZG, ParamsVerifierKZG};
    |                                                                           ^^^^^^^^^^^^^^^^^

Check warning on line 28 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `std::marker::PhantomData`

warning: unused import: `std::marker::PhantomData`
  --> halo2_proofs/tests/frontend_backend_split.rs:28:5
   |
28 | use std::marker::PhantomData;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 26 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `OsRng`, `RngCore`

warning: unused imports: `OsRng`, `RngCore`
  --> halo2_proofs/tests/frontend_backend_split.rs:26:17
   |
26 | use rand_core::{OsRng, RngCore};
   |                 ^^^^^  ^^^^^^^

Check warning on line 19 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `CommitmentScheme`

warning: unused import: `CommitmentScheme`
  --> halo2_proofs/tests/frontend_backend_split.rs:19:38
   |
19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                      ^^^^^^^^^^^^^^^^

Check warning on line 15 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `Assigned`, `CompiledCircuitV2`, `ConstraintSystemV2Backend`, `ProvingKey`, `TableColumn`, `VerifyingKey`

warning: unused imports: `Assigned`, `CompiledCircuitV2`, `ConstraintSystemV2Backend`, `ProvingKey`, `TableColumn`, `VerifyingKey`
  --> halo2_proofs/tests/frontend_backend_split.rs:15:5
   |
15 |     Assigned, Challenge, Circuit, Column, CompiledCircuitV2, ConstraintSystem,
   |     ^^^^^^^^                              ^^^^^^^^^^^^^^^^^
16 |     ConstraintSystemV2Backend, Error, Expression, FirstPhase, Fixed, Instance, ProverV2Single,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
17 |     ProvingKey, SecondPhase, Selector, TableColumn, VerifyingKey, WitnessCalculator,
   |     ^^^^^^^^^^                         ^^^^^^^^^^^  ^^^^^^^^^^^^

Check warning on line 11 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Cell`

warning: unused import: `Cell`
  --> halo2_proofs/tests/frontend_backend_split.rs:11:43
   |
11 | use halo2_proofs::circuit::{AssignedCell, Cell, Layouter, Region, SimpleFloorPlanner, Value};
   |                                           ^^^^

Check warning on line 9 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`

warning: unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`
 --> halo2_proofs/tests/frontend_backend_split.rs:9:10
  |
9 | use ff::{FromUniformBytes, WithSmallOrderMulGroup};
  |          ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 8 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `assert_matches::assert_matches`

warning: unused import: `assert_matches::assert_matches`
 --> halo2_proofs/tests/frontend_backend_split.rs:8:5
  |
8 | use assert_matches::assert_matches;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 273 in halo2_proofs/src/plonk.rs

See this annotation in the file changed.

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

accessing first element with `self .selectors.get(0)`

warning: accessing first element with `self
                             .selectors.get(0)`
   --> halo2_proofs/src/plonk.rs:271:20
    |
271 |                   * (self
    |  ____________________^
272 | |                     .selectors
273 | |                     .get(0)
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-W clippy::get-first` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
help: try
    |
271 ~                 * (self
272 +                     .selectors.first()
    |

Check warning on line 455 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> halo2_proofs/src/plonk/prover.rs:455:29
    |
455 | ...                   &domain,
    |                       ^^^^^^^ help: change this to: `domain`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 434 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`

warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
   --> halo2_proofs/src/plonk/prover.rs:434:22
    |
434 |         let advice = std::mem::replace(&mut self.advice, Vec::new());
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.advice)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default

Check warning on line 433 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`

warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
   --> halo2_proofs/src/plonk/prover.rs:433:24
    |
433 |         let instance = std::mem::replace(&mut self.instance, Vec::new());
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.instance)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
    = note: `-W clippy::mem-replace-with-default` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::mem_replace_with_default)]`

Check warning on line 337 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

this `if` has identical blocks

warning: this `if` has identical blocks
   --> halo2_proofs/src/plonk/prover.rs:334:55
    |
334 |               if column_indices.contains(&column_index) {
    |  _______________________________________________________^
335 | |                 // TODO: Check that column_index in witness is Some
336 | |                 // TODO: Check that the column length is `params.n()`
337 | |             } else {
    | |_____________^
    |
note: same as this
   --> halo2_proofs/src/plonk/prover.rs:337:20
    |
337 |               } else {
    |  ____________________^
338 | |                 // TODO: Check that column_index in witness is None
339 | |             };
    | |_____________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
    = note: `-W clippy::if-same-then-else` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::if_same_then_else)]`