Skip to content

Make legacy wrappers over v2 #274

Make legacy wrappers over v2

Make legacy wrappers over v2 #274

Triggered via push January 4, 2024 23:01
Status Success
Total duration 52s
Artifacts

lints-beta.yml

on: push
Clippy (beta)
42s
Clippy (beta)
Fit to window
Zoom out
Zoom in

Annotations

40 errors and 64 warnings
accessing first element with `slice.get(0)`: halo2_proofs/src/helpers.rs#L153
error: 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
accessing first element with `self .selectors.get(0)`: halo2_proofs/src/plonk.rs#L271
error: 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: `-D clippy::get-first` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::get_first)]` help: try | 271 ~ * (self 272 + .selectors.first() |
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/src/plonk/prover.rs#L455
error: 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: `-D clippy::needless-borrow` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L434
error: 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
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L433
error: 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: `-D clippy::mem-replace-with-default` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
this `if` has identical blocks: halo2_proofs/src/plonk/prover.rs#L334
error: 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: `#[deny(clippy::if_same_then_else)]` on by default
unnecessary `if let` since only the `Some` variant of the iterator element is used: halo2_proofs/src/plonk/prover.rs#L319
error: unnecessary `if let` since only the `Some` variant of the iterator element is used --> halo2_proofs/src/plonk/prover.rs:319:13 | 319 | for witness_column in witness_circuit { | ^ --------------- help: try: `witness_circuit.iter().flatten()` | _____________| | | 320 | | if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( ... | 328 | | } 329 | | } | |_____________^ | help: ...and remove the `if let` statement in the for loop --> halo2_proofs/src/plonk/prover.rs:320:17 | 320 | / if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( 323 | | "unexpected length in witness_column. Got {}, expected {}", ... | 327 | | } 328 | | } | |_________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten = note: `-D clippy::manual-flatten` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_flatten)]`
useless use of `format!`: halo2_proofs/src/plonk/prover.rs#L309
error: useless use of `format!` --> halo2_proofs/src/plonk/prover.rs:309:37 | 309 | 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: `-D clippy::useless-format` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/prover.rs#L268
error: very complex type used. Consider factoring parts into `type` definitions --> halo2_proofs/src/plonk/prover.rs:268:18 | 268 | 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
error: 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
error: 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: `-D clippy::redundant-closure` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/circuit.rs#L2128
error: 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
error: 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
error: 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: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/circuit.rs#L2000
error: 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
error: 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: `-D clippy::type-complexity` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::type_complexity)]`
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: halo2_proofs/src/plonk/circuit.rs#L1738
error: 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: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::wrong_self_convention)]`
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
error: 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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `-D clippy::from-over-into` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]` help: replace the `Into` implementation with `From<plonk::circuit::Expression<F>>` | 892 ~ impl<F> From<Expression<F>> for ExpressionMid<F> { 893 ~ fn from(val: Expression<F>) -> Self { 894 ~ match val { |
accessing first element with `slice.get(0)`: halo2_proofs/src/helpers.rs#L153
error: 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
accessing first element with `self .selectors.get(0)`: halo2_proofs/src/plonk.rs#L271
error: 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: `-D clippy::get-first` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::get_first)]` help: try | 271 ~ * (self 272 + .selectors.first() |
unused variable: `advice_column`: halo2_proofs/src/plonk/prover.rs#L333
error: unused variable: `advice_column` --> halo2_proofs/src/plonk/prover.rs:333:28 | 333 | for (column_index, advice_column) in witness.iter().enumerate() { | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_advice_column` | = note: `-D unused-variables` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_variables)]`
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/src/plonk/prover.rs#L455
error: 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: `-D clippy::needless-borrow` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L434
error: 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
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L433
error: 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: `-D clippy::mem-replace-with-default` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
this `if` has identical blocks: halo2_proofs/src/plonk/prover.rs#L334
error: 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: `#[deny(clippy::if_same_then_else)]` on by default
unnecessary `if let` since only the `Some` variant of the iterator element is used: halo2_proofs/src/plonk/prover.rs#L319
error: unnecessary `if let` since only the `Some` variant of the iterator element is used --> halo2_proofs/src/plonk/prover.rs:319:13 | 319 | for witness_column in witness_circuit { | ^ --------------- help: try: `witness_circuit.iter().flatten()` | _____________| | | 320 | | if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( ... | 328 | | } 329 | | } | |_____________^ | help: ...and remove the `if let` statement in the for loop --> halo2_proofs/src/plonk/prover.rs:320:17 | 320 | / if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( 323 | | "unexpected length in witness_column. Got {}, expected {}", ... | 327 | | } 328 | | } | |_________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten = note: `-D clippy::manual-flatten` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_flatten)]`
useless use of `format!`: halo2_proofs/src/plonk/prover.rs#L309
error: useless use of `format!` --> halo2_proofs/src/plonk/prover.rs:309:37 | 309 | 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: `-D clippy::useless-format` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/prover.rs#L268
error: very complex type used. Consider factoring parts into `type` definitions --> halo2_proofs/src/plonk/prover.rs:268:18 | 268 | 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
error: 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
error: 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: `-D clippy::redundant-closure` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/circuit.rs#L2128
error: 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
error: 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
error: 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: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/circuit.rs#L2000
error: 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
error: 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: `-D clippy::type-complexity` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::type_complexity)]`
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: halo2_proofs/src/plonk/circuit.rs#L1738
error: 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: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::wrong_self_convention)]`
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
error: 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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `-D clippy::from-over-into` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]` help: replace the `Into` implementation with `From<plonk::circuit::Expression<F>>` | 892 ~ impl<F> From<Expression<F>> for ExpressionMid<F> { 893 ~ fn from(val: Expression<F>) -> Self { 894 ~ match val { |
unused variable: `advice_column`: halo2_proofs/src/plonk/prover.rs#L333
error: unused variable: `advice_column` --> halo2_proofs/src/plonk/prover.rs:333:28 | 333 | for (column_index, advice_column) in witness.iter().enumerate() { | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_advice_column` | = note: `-D unused-variables` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_variables)]`
unused import: `Scope`: halo2_proofs/src/multicore.rs#L12
error: unused import: `Scope` --> halo2_proofs/src/multicore.rs:12:18 | 12 | join, scope, Scope, | ^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`
unused import: `Scope`: halo2_proofs/src/multicore.rs#L12
error: unused import: `Scope` --> halo2_proofs/src/multicore.rs:12:18 | 12 | join, scope, Scope, | ^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`
accessing first element with `slice.get(0)`: halo2_proofs/src/helpers.rs#L153
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
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/tests/frontend_backend_split.rs#L611
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
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/tests/frontend_backend_split.rs#L535
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)]`
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: halo2_proofs/tests/frontend_backend_split.rs#L191
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
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: halo2_proofs/tests/frontend_backend_split.rs#L181
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)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/tests/frontend_backend_split.rs#L69
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)]`
unused variable: `instance`: halo2_proofs/tests/frontend_backend_split.rs#L430
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`
unused variable: `i`: halo2_proofs/tests/frontend_backend_split.rs#L430
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
unused import: `EncodedChallenge`: halo2_proofs/tests/frontend_backend_split.rs#L23
warning: unused import: `EncodedChallenge` --> halo2_proofs/tests/frontend_backend_split.rs:23:46 | 23 | Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer, | ^^^^^^^^^^^^^^^^
unused import: `halo2_proofs::poly::VerificationStrategy`: halo2_proofs/tests/frontend_backend_split.rs#L21
warning: unused import: `halo2_proofs::poly::VerificationStrategy` --> halo2_proofs/tests/frontend_backend_split.rs:21:5 | 21 | use halo2_proofs::poly::VerificationStrategy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `Verifier`: halo2_proofs/tests/frontend_backend_split.rs#L19
warning: unused import: `Verifier` --> halo2_proofs/tests/frontend_backend_split.rs:19:78 | 19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier}; | ^^^^^^^^
unused import: `Prover`: halo2_proofs/tests/frontend_backend_split.rs#L19
warning: unused import: `Prover` --> halo2_proofs/tests/frontend_backend_split.rs:19:70 | 19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier}; | ^^^^^^
unused import: `ParamsVerifierKZG`: halo2_proofs/tests/frontend_backend_split.rs#L445
warning: unused import: `ParamsVerifierKZG` --> halo2_proofs/tests/frontend_backend_split.rs:445:75 | 445 | use halo2_proofs::poly::kzg::commitment::{KZGCommitmentScheme, ParamsKZG, ParamsVerifierKZG}; | ^^^^^^^^^^^^^^^^^
unused import: `std::marker::PhantomData`: halo2_proofs/tests/frontend_backend_split.rs#L28
warning: unused import: `std::marker::PhantomData` --> halo2_proofs/tests/frontend_backend_split.rs:28:5 | 28 | use std::marker::PhantomData; | ^^^^^^^^^^^^^^^^^^^^^^^^
unused imports: `OsRng`, `RngCore`: halo2_proofs/tests/frontend_backend_split.rs#L26
warning: unused imports: `OsRng`, `RngCore` --> halo2_proofs/tests/frontend_backend_split.rs:26:17 | 26 | use rand_core::{OsRng, RngCore}; | ^^^^^ ^^^^^^^
unused import: `CommitmentScheme`: halo2_proofs/tests/frontend_backend_split.rs#L19
warning: unused import: `CommitmentScheme` --> halo2_proofs/tests/frontend_backend_split.rs:19:38 | 19 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier}; | ^^^^^^^^^^^^^^^^
unused imports: `Assigned`, `CompiledCircuitV2`, `ConstraintSystemV2Backend`, `ProvingKey`, `TableColumn`, `VerifyingKey`: halo2_proofs/tests/frontend_backend_split.rs#L15
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, | ^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^
unused import: `Cell`: halo2_proofs/tests/frontend_backend_split.rs#L11
warning: unused import: `Cell` --> halo2_proofs/tests/frontend_backend_split.rs:11:43 | 11 | use halo2_proofs::circuit::{AssignedCell, Cell, Layouter, Region, SimpleFloorPlanner, Value}; | ^^^^
unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`: halo2_proofs/tests/frontend_backend_split.rs#L9
warning: unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup` --> halo2_proofs/tests/frontend_backend_split.rs:9:10 | 9 | use ff::{FromUniformBytes, WithSmallOrderMulGroup}; | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
unused import: `assert_matches::assert_matches`: halo2_proofs/tests/frontend_backend_split.rs#L8
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
accessing first element with `self .selectors.get(0)`: halo2_proofs/src/plonk.rs#L271
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() |
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/src/plonk/prover.rs#L455
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)]`
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L434
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
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L433
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)]`
this `if` has identical blocks: halo2_proofs/src/plonk/prover.rs#L334
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)]`
unnecessary `if let` since only the `Some` variant of the iterator element is used: halo2_proofs/src/plonk/prover.rs#L319
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used --> halo2_proofs/src/plonk/prover.rs:319:13 | 319 | for witness_column in witness_circuit { | ^ --------------- help: try: `witness_circuit.iter().flatten()` | _____________| | | 320 | | if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( ... | 328 | | } 329 | | } | |_____________^ | help: ...and remove the `if let` statement in the for loop --> halo2_proofs/src/plonk/prover.rs:320:17 | 320 | / if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( 323 | | "unexpected length in witness_column. Got {}, expected {}", ... | 327 | | } 328 | | } | |_________________^ = 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` = help: to override `-W clippy::all` add `#[allow(clippy::manual_flatten)]`
useless use of `format!`: halo2_proofs/src/plonk/prover.rs#L309
warning: useless use of `format!` --> halo2_proofs/src/plonk/prover.rs:309:37 | 309 | 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` = help: to override `-W clippy::all` add `#[allow(clippy::useless_format)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/prover.rs#L268
warning: very complex type used. Consider factoring parts into `type` definitions --> halo2_proofs/src/plonk/prover.rs:268:18 | 268 | 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` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
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: 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` = help: to override `-W clippy::all` add `#[allow(clippy::from_over_into)]` help: replace the `Into` implementation with `From<plonk::circuit::Expression<F>>` | 892 ~ impl<F> From<Expression<F>> for ExpressionMid<F> { 893 ~ fn from(val: Expression<F>) -> Self { 894 ~ match val { |
accessing first element with `slice.get(0)`: halo2_proofs/src/helpers.rs#L153
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
accessing first element with `self .selectors.get(0)`: halo2_proofs/src/plonk.rs#L271
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() |
this expression creates a reference which is immediately dereferenced by the compiler: halo2_proofs/src/plonk/prover.rs#L455
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)]`
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L434
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
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: halo2_proofs/src/plonk/prover.rs#L433
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)]`
this `if` has identical blocks: halo2_proofs/src/plonk/prover.rs#L334
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)]`
unnecessary `if let` since only the `Some` variant of the iterator element is used: halo2_proofs/src/plonk/prover.rs#L319
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used --> halo2_proofs/src/plonk/prover.rs:319:13 | 319 | for witness_column in witness_circuit { | ^ --------------- help: try: `witness_circuit.iter().flatten()` | _____________| | | 320 | | if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( ... | 328 | | } 329 | | } | |_____________^ | help: ...and remove the `if let` statement in the for loop --> halo2_proofs/src/plonk/prover.rs:320:17 | 320 | / if let Some(witness_column) = witness_column { 321 | | if witness_column.len() != self.params.n() as usize { 322 | | return Err(Error::Other(format!( 323 | | "unexpected length in witness_column. Got {}, expected {}", ... | 327 | | } 328 | | } | |_________________^ = 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` = help: to override `-W clippy::all` add `#[allow(clippy::manual_flatten)]`
useless use of `format!`: halo2_proofs/src/plonk/prover.rs#L309
warning: useless use of `format!` --> halo2_proofs/src/plonk/prover.rs:309:37 | 309 | 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` = help: to override `-W clippy::all` add `#[allow(clippy::useless_format)]`
very complex type used. Consider factoring parts into `type` definitions: halo2_proofs/src/plonk/prover.rs#L268
warning: very complex type used. Consider factoring parts into `type` definitions --> halo2_proofs/src/plonk/prover.rs:268:18 | 268 | 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
unused variable: `advice_column`: halo2_proofs/src/plonk/prover.rs#L333
warning: unused variable: `advice_column` --> halo2_proofs/src/plonk/prover.rs:333:28 | 333 | 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
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` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`
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` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
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: 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` = help: to override `-W clippy::all` add `#[allow(clippy::from_over_into)]` help: replace the `Into` implementation with `From<plonk::circuit::Expression<F>>` | 892 ~ impl<F> From<Expression<F>> for ExpressionMid<F> { 893 ~ fn from(val: Expression<F>) -> Self { 894 ~ match val { |
unused variable: `advice_column`: halo2_proofs/src/plonk/prover.rs#L333
warning: unused variable: `advice_column` --> halo2_proofs/src/plonk/prover.rs:333:28 | 333 | 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
unused import: `Scope`: halo2_proofs/src/multicore.rs#L12
warning: unused import: `Scope` --> halo2_proofs/src/multicore.rs:12:18 | 12 | join, scope, Scope, | ^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `Scope`: halo2_proofs/src/multicore.rs#L12
warning: unused import: `Scope` --> halo2_proofs/src/multicore.rs:12:18 | 12 | join, scope, Scope, | ^^^^^ | = note: `#[warn(unused_imports)]` 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/