Clean up #268
Annotations
59 warnings
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/src/plonk/prover.rs#L390
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:390:29
|
390 | ... &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`
|
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`:
halo2_proofs/src/plonk/prover.rs#L369
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:369:22
|
369 | 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
|
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`:
halo2_proofs/src/plonk/prover.rs#L368
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:368:24
|
368 | 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`
|
this `if` has identical blocks:
halo2_proofs/src/plonk/prover.rs#L268
warning: this `if` has identical blocks
--> halo2_proofs/src/plonk/prover.rs:268:55
|
268 | if column_indices.contains(&column_index) {
| _______________________________________________________^
269 | | // TODO: Check that column_index in witness is Some
270 | | // TODO: Check that the column length is `params.n()`
271 | | } else {
| |_____________^
|
note: same as this
--> halo2_proofs/src/plonk/prover.rs:271:20
|
271 | } else {
| ____________________^
272 | | // TODO: Check that column_index in witness is None
273 | | };
| |_____________^
= 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`
|
unnecessary `if let` since only the `Some` variant of the iterator element is used:
halo2_proofs/src/plonk/prover.rs#L253
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used
--> halo2_proofs/src/plonk/prover.rs:253:13
|
253 | for witness_column in witness_circuit {
| ^ --------------- help: try: `witness_circuit.iter().flatten()`
| _____________|
| |
254 | | if let Some(witness_column) = witness_column {
255 | | if witness_column.len() != self.params.n() as usize {
256 | | return Err(Error::Other(format!(
... |
262 | | }
263 | | }
| |_____________^
|
help: ...and remove the `if let` statement in the for loop
--> halo2_proofs/src/plonk/prover.rs:254:17
|
254 | / if let Some(witness_column) = witness_column {
255 | | if witness_column.len() != self.params.n() as usize {
256 | | return Err(Error::Other(format!(
257 | | "unexpected length in witness_column. Got {}, expected {}",
... |
261 | | }
262 | | }
| |_________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
= note: `-W clippy::manual-flatten` implied by `-W clippy::all`
|
useless use of `format!`:
halo2_proofs/src/plonk/prover.rs#L243
warning: useless use of `format!`
--> halo2_proofs/src/plonk/prover.rs:243:37
|
243 | return Err(Error::Other(format!("witness.len() != advice.len()")));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"witness.len() != advice.len()".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `-W clippy::useless-format` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/prover.rs#L203
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/prover.rs:203:18
|
203 | witness: Vec<Vec<Option<Polynomial<Assigned<Scheme::Scalar>, LagrangeCoeff>>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
redundant closure:
halo2_proofs/src/plonk/circuit.rs#L2294
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2294:22
|
2294 | .map(|p| sealed::Phase(p))
| ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sealed::Phase`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
halo2_proofs/src/plonk/circuit.rs#L2289
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2289:22
|
2289 | .map(|p| sealed::Phase(p))
| ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sealed::Phase`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-W clippy::redundant-closure` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L2128
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2128:10
|
2128 | ) -> (
| __________^
2129 | | Queries,
2130 | | Vec<Gate<F>>,
2131 | | Vec<lookup::Argument<F>>,
2132 | | Vec<shuffle::Argument<F>>,
2133 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
casting to the same type is unnecessary (`usize` -> `usize`):
halo2_proofs/src/plonk/circuit.rs#L2025
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2025:25
|
2025 | usable_rows: 0..n as usize - (cs.blinding_factors() + 1),
| ^^^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
halo2_proofs/src/plonk/circuit.rs#L2024
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2024:37
|
2024 | selectors: vec![vec![false; n as usize]; cs.num_selectors],
| ^^^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L2000
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2000:6
|
2000 | ) -> Result<
| ______^
2001 | | (
2002 | | CompiledCircuitV2<F>,
2003 | | ConcreteCircuit::Config,
... |
2006 | | Error,
2007 | | > {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L1928
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1928:10
|
1928 | ) -> Result<Vec<Option<Polynomial<Assigned<F>, LagrangeCoeff>>>, 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`
|
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference:
halo2_proofs/src/plonk/circuit.rs#L1738
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1738:32
|
1738 | fn to_expression<F: Field>(&mut self, expr: &ExpressionMid<F>) -> Expression<F> {
| ^^^^^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `-W clippy::wrong-self-convention` implied by `-W clippy::all`
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
halo2_proofs/src/plonk/circuit.rs#L892
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> halo2_proofs/src/plonk/circuit.rs:892:1
|
892 | impl<F> Into<ExpressionMid<F>> for Expression<F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace the `Into` implentation with `From<plonk::circuit::Expression<F>>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-W clippy::from-over-into` implied by `-W clippy::all`
|
unused variable: `advice_column`:
halo2_proofs/src/plonk/prover.rs#L267
warning: unused variable: `advice_column`
--> halo2_proofs/src/plonk/prover.rs:267:28
|
267 | for (column_index, advice_column) in witness.iter().enumerate() {
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_advice_column`
|
= note: `#[warn(unused_variables)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/tests/frontend_backend_split.rs#L578
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/tests/frontend_backend_split.rs:578:40
|
578 | 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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/tests/frontend_backend_split.rs#L511
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/tests/frontend_backend_split.rs:511:40
|
511 | 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`
|
redundant clone:
halo2_proofs/tests/frontend_backend_split.rs#L496
warning: redundant clone
--> halo2_proofs/tests/frontend_backend_split.rs:496:18
|
496 | &[circuit.clone()],
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> halo2_proofs/tests/frontend_backend_split.rs:496:11
|
496 | &[circuit.clone()],
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-W clippy::redundant-clone` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/tests/frontend_backend_split.rs#L65
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/tests/frontend_backend_split.rs:65:10
|
65 | ) -> 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`
|
variable does not need to be mutable:
halo2_proofs/tests/frontend_backend_split.rs#L567
warning: variable does not need to be mutable
--> halo2_proofs/tests/frontend_backend_split.rs:567:9
|
567 | let mut transcript = prover.create_proof().unwrap();
| ----^^^^^^^^^^
| |
| help: remove this `mut`
|
variable does not need to be mutable:
halo2_proofs/tests/frontend_backend_split.rs#L548
warning: variable does not need to be mutable
--> halo2_proofs/tests/frontend_backend_split.rs:548:9
|
548 | let mut transcript = Blake2bWrite::<_, G1Affine, Challenge255<_>>::init(vec![]);
| ----^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
unused variable: `instance`:
halo2_proofs/tests/frontend_backend_split.rs#L426
warning: unused variable: `instance`
--> halo2_proofs/tests/frontend_backend_split.rs:426:29
|
426 | for (i, instance) in instance_copy.iter().enumerate() {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_instance`
|
unused variable: `i`:
halo2_proofs/tests/frontend_backend_split.rs#L426
warning: unused variable: `i`
--> halo2_proofs/tests/frontend_backend_split.rs:426:26
|
426 | 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
|
unused import: `EncodedChallenge`:
halo2_proofs/tests/frontend_backend_split.rs#L19
warning: unused import: `EncodedChallenge`
--> halo2_proofs/tests/frontend_backend_split.rs:19:46
|
19 | Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer,
| ^^^^^^^^^^^^^^^^
|
unused import: `halo2_proofs::poly::VerificationStrategy`:
halo2_proofs/tests/frontend_backend_split.rs#L17
warning: unused import: `halo2_proofs::poly::VerificationStrategy`
--> halo2_proofs/tests/frontend_backend_split.rs:17:5
|
17 | use halo2_proofs::poly::VerificationStrategy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `Verifier`:
halo2_proofs/tests/frontend_backend_split.rs#L15
warning: unused import: `Verifier`
--> halo2_proofs/tests/frontend_backend_split.rs:15:78
|
15 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
| ^^^^^^^^
|
unused import: `Prover`:
halo2_proofs/tests/frontend_backend_split.rs#L15
warning: unused import: `Prover`
--> halo2_proofs/tests/frontend_backend_split.rs:15:70
|
15 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
| ^^^^^^
|
unused import: `ParamsVerifierKZG`:
halo2_proofs/tests/frontend_backend_split.rs#L441
warning: unused import: `ParamsVerifierKZG`
--> halo2_proofs/tests/frontend_backend_split.rs:441:75
|
441 | use halo2_proofs::poly::kzg::commitment::{KZGCommitmentScheme, ParamsKZG, ParamsVerifierKZG};
| ^^^^^^^^^^^^^^^^^
|
unused import: `std::marker::PhantomData`:
halo2_proofs/tests/frontend_backend_split.rs#L24
warning: unused import: `std::marker::PhantomData`
--> halo2_proofs/tests/frontend_backend_split.rs:24:5
|
24 | use std::marker::PhantomData;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `OsRng`, `RngCore`:
halo2_proofs/tests/frontend_backend_split.rs#L22
warning: unused imports: `OsRng`, `RngCore`
--> halo2_proofs/tests/frontend_backend_split.rs:22:17
|
22 | use rand_core::{OsRng, RngCore};
| ^^^^^ ^^^^^^^
|
unused import: `CommitmentScheme`:
halo2_proofs/tests/frontend_backend_split.rs#L15
warning: unused import: `CommitmentScheme`
--> halo2_proofs/tests/frontend_backend_split.rs:15:38
|
15 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
| ^^^^^^^^^^^^^^^^
|
unused imports: `Assigned`, `CompiledCircuitV2`, `ConstraintSystemV2Backend`, `ProvingKey`, `TableColumn`, `VerifyingKey`:
halo2_proofs/tests/frontend_backend_split.rs#L11
warning: unused imports: `Assigned`, `CompiledCircuitV2`, `ConstraintSystemV2Backend`, `ProvingKey`, `TableColumn`, `VerifyingKey`
--> halo2_proofs/tests/frontend_backend_split.rs:11:13
|
11 | Advice, Assigned, Challenge, Circuit, Column, CompiledCircuitV2, ConstraintSystem,
| ^^^^^^^^ ^^^^^^^^^^^^^^^^^
12 | ConstraintSystemV2Backend, Error, Expression, FirstPhase, Fixed, Instance, ProverV2,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
13 | ProvingKey, SecondPhase, Selector, TableColumn, VerifyingKey, WitnessCalculator,
| ^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^
|
unused import: `Cell`:
halo2_proofs/tests/frontend_backend_split.rs#L7
warning: unused import: `Cell`
--> halo2_proofs/tests/frontend_backend_split.rs:7:43
|
7 | use halo2_proofs::circuit::{AssignedCell, Cell, Layouter, Region, SimpleFloorPlanner, Value};
| ^^^^
|
unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`:
halo2_proofs/tests/frontend_backend_split.rs#L5
warning: unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`
--> halo2_proofs/tests/frontend_backend_split.rs:5:10
|
5 | use ff::{FromUniformBytes, WithSmallOrderMulGroup};
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `assert_matches::assert_matches`:
halo2_proofs/tests/frontend_backend_split.rs#L4
warning: unused import: `assert_matches::assert_matches`
--> halo2_proofs/tests/frontend_backend_split.rs:4:5
|
4 | use assert_matches::assert_matches;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/src/plonk/prover.rs#L390
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:390:29
|
390 | ... &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`
|
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`:
halo2_proofs/src/plonk/prover.rs#L369
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:369:22
|
369 | 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
|
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`:
halo2_proofs/src/plonk/prover.rs#L368
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:368:24
|
368 | 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`
|
this `if` has identical blocks:
halo2_proofs/src/plonk/prover.rs#L268
warning: this `if` has identical blocks
--> halo2_proofs/src/plonk/prover.rs:268:55
|
268 | if column_indices.contains(&column_index) {
| _______________________________________________________^
269 | | // TODO: Check that column_index in witness is Some
270 | | // TODO: Check that the column length is `params.n()`
271 | | } else {
| |_____________^
|
note: same as this
--> halo2_proofs/src/plonk/prover.rs:271:20
|
271 | } else {
| ____________________^
272 | | // TODO: Check that column_index in witness is None
273 | | };
| |_____________^
= 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`
|
unnecessary `if let` since only the `Some` variant of the iterator element is used:
halo2_proofs/src/plonk/prover.rs#L253
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used
--> halo2_proofs/src/plonk/prover.rs:253:13
|
253 | for witness_column in witness_circuit {
| ^ --------------- help: try: `witness_circuit.iter().flatten()`
| _____________|
| |
254 | | if let Some(witness_column) = witness_column {
255 | | if witness_column.len() != self.params.n() as usize {
256 | | return Err(Error::Other(format!(
... |
262 | | }
263 | | }
| |_____________^
|
help: ...and remove the `if let` statement in the for loop
--> halo2_proofs/src/plonk/prover.rs:254:17
|
254 | / if let Some(witness_column) = witness_column {
255 | | if witness_column.len() != self.params.n() as usize {
256 | | return Err(Error::Other(format!(
257 | | "unexpected length in witness_column. Got {}, expected {}",
... |
261 | | }
262 | | }
| |_________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
= note: `-W clippy::manual-flatten` implied by `-W clippy::all`
|
useless use of `format!`:
halo2_proofs/src/plonk/prover.rs#L243
warning: useless use of `format!`
--> halo2_proofs/src/plonk/prover.rs:243:37
|
243 | return Err(Error::Other(format!("witness.len() != advice.len()")));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"witness.len() != advice.len()".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `-W clippy::useless-format` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/prover.rs#L203
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/prover.rs:203:18
|
203 | witness: Vec<Vec<Option<Polynomial<Assigned<Scheme::Scalar>, LagrangeCoeff>>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
redundant closure:
halo2_proofs/src/plonk/circuit.rs#L2294
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2294:22
|
2294 | .map(|p| sealed::Phase(p))
| ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sealed::Phase`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
halo2_proofs/src/plonk/circuit.rs#L2289
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2289:22
|
2289 | .map(|p| sealed::Phase(p))
| ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `sealed::Phase`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-W clippy::redundant-closure` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L2128
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2128:10
|
2128 | ) -> (
| __________^
2129 | | Queries,
2130 | | Vec<Gate<F>>,
2131 | | Vec<lookup::Argument<F>>,
2132 | | Vec<shuffle::Argument<F>>,
2133 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
casting to the same type is unnecessary (`usize` -> `usize`):
halo2_proofs/src/plonk/circuit.rs#L2025
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2025:25
|
2025 | usable_rows: 0..n as usize - (cs.blinding_factors() + 1),
| ^^^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
halo2_proofs/src/plonk/circuit.rs#L2024
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2024:37
|
2024 | selectors: vec![vec![false; n as usize]; cs.num_selectors],
| ^^^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L2000
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2000:6
|
2000 | ) -> Result<
| ______^
2001 | | (
2002 | | CompiledCircuitV2<F>,
2003 | | ConcreteCircuit::Config,
... |
2006 | | Error,
2007 | | > {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
very complex type used. Consider factoring parts into `type` definitions:
halo2_proofs/src/plonk/circuit.rs#L1928
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1928:10
|
1928 | ) -> Result<Vec<Option<Polynomial<Assigned<F>, LagrangeCoeff>>>, 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`
|
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference:
halo2_proofs/src/plonk/circuit.rs#L1738
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1738:32
|
1738 | fn to_expression<F: Field>(&mut self, expr: &ExpressionMid<F>) -> Expression<F> {
| ^^^^^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `-W clippy::wrong-self-convention` implied by `-W clippy::all`
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
halo2_proofs/src/plonk/circuit.rs#L892
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> halo2_proofs/src/plonk/circuit.rs:892:1
|
892 | impl<F> Into<ExpressionMid<F>> for Expression<F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace the `Into` implentation with `From<plonk::circuit::Expression<F>>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-W clippy::from-over-into` implied by `-W clippy::all`
|
unused variable: `advice_column`:
halo2_proofs/src/plonk/prover.rs#L267
warning: unused variable: `advice_column`
--> halo2_proofs/src/plonk/prover.rs:267:28
|
267 | for (column_index, advice_column) in witness.iter().enumerate() {
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_advice_column`
|
= note: `#[warn(unused_variables)]` on by default
|
Clippy (beta)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Clippy (beta)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy (beta)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy (beta)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy (beta)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|