Remove old API in favour of legacy wrappers #275
Annotations
38 errors and 48 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#L477
error: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:477:29
|
477 | ... &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#L456
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:456:22
|
456 | 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#L455
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:455:24
|
455 | 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)]`
|
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#L2292
error: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2292:22
|
2292 | .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#L2287
error: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2287:22
|
2287 | .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#L2126
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2126:10
|
2126 | ) -> (
| __________^
2127 | | Queries,
2128 | | Vec<Gate<F>>,
2129 | | Vec<lookup::Argument<F>>,
2130 | | Vec<shuffle::Argument<F>>,
2131 | | ) {
| |_____^
|
= 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#L2023
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2023:25
|
2023 | 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#L2022
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2022:37
|
2022 | 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#L1998
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1998:6
|
1998 | ) -> Result<
| ______^
1999 | | (
2000 | | CompiledCircuitV2<F>,
2001 | | ConcreteCircuit::Config,
... |
2004 | | Error,
2005 | | > {
| |_^
|
= 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#L1927
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1927:10
|
1927 | ) -> 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#L1737
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1737:32
|
1737 | 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#L891
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:891:1
|
891 | 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>>`
|
891 ~ impl<F> From<Expression<F>> for ExpressionMid<F> {
892 ~ fn from(val: Expression<F>) -> Self {
893 ~ 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()
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/src/plonk/prover.rs#L477
error: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:477:29
|
477 | ... &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#L456
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:456:22
|
456 | 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#L455
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:455:24
|
455 | 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)]`
|
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#L2292
error: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2292:22
|
2292 | .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#L2287
error: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2287:22
|
2287 | .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#L2126
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2126:10
|
2126 | ) -> (
| __________^
2127 | | Queries,
2128 | | Vec<Gate<F>>,
2129 | | Vec<lookup::Argument<F>>,
2130 | | Vec<shuffle::Argument<F>>,
2131 | | ) {
| |_____^
|
= 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#L2023
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2023:25
|
2023 | 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#L2022
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2022:37
|
2022 | 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#L1998
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1998:6
|
1998 | ) -> Result<
| ______^
1999 | | (
2000 | | CompiledCircuitV2<F>,
2001 | | ConcreteCircuit::Config,
... |
2004 | | Error,
2005 | | > {
| |_^
|
= 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#L1927
error: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1927:10
|
1927 | ) -> 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#L1737
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1737:32
|
1737 | 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#L891
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:891:1
|
891 | 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>>`
|
891 ~ impl<F> From<Expression<F>> for ExpressionMid<F> {
892 ~ fn from(val: Expression<F>) -> Self {
893 ~ match val {
|
|
this `else { if .. }` block can be collapsed:
halo2_proofs/src/plonk/prover.rs#L353
error: this `else { if .. }` block can be collapsed
--> halo2_proofs/src/plonk/prover.rs:353:24
|
353 | } else {
| ________________________^
354 | | if advice_column.is_some() {
355 | | return Err(Error::Other(format!(
356 | | "expected no advice column with index {} at phase {}",
... |
359 | | }
360 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
353 ~ } else if advice_column.is_some() {
354 + return Err(Error::Other(format!(
355 + "expected no advice column with index {} at phase {}",
356 + column_index, current_phase.0
357 + )));
358 ~ };
|
|
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)]`
|
this `else { if .. }` block can be collapsed:
halo2_proofs/src/plonk/prover.rs#L353
error: this `else { if .. }` block can be collapsed
--> halo2_proofs/src/plonk/prover.rs:353:24
|
353 | } else {
| ________________________^
354 | | if advice_column.is_some() {
355 | | return Err(Error::Other(format!(
356 | | "expected no advice column with index {} at phase {}",
... |
359 | | }
360 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
353 ~ } else if advice_column.is_some() {
354 + return Err(Error::Other(format!(
355 + "expected no advice column with index {} at phase {}",
356 + column_index, current_phase.0
357 + )));
358 ~ };
|
|
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
|
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#L477
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:477:29
|
477 | ... &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#L456
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:456:22
|
456 | 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#L455
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:455:24
|
455 | 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)]`
|
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#L2292
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2292:22
|
2292 | .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#L2287
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2287:22
|
2287 | .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#L2126
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2126:10
|
2126 | ) -> (
| __________^
2127 | | Queries,
2128 | | Vec<Gate<F>>,
2129 | | Vec<lookup::Argument<F>>,
2130 | | Vec<shuffle::Argument<F>>,
2131 | | ) {
| |_____^
|
= 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#L2023
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2023:25
|
2023 | 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#L2022
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2022:37
|
2022 | 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#L1998
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1998:6
|
1998 | ) -> Result<
| ______^
1999 | | (
2000 | | CompiledCircuitV2<F>,
2001 | | ConcreteCircuit::Config,
... |
2004 | | Error,
2005 | | > {
| |_^
|
= 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#L1927
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1927:10
|
1927 | ) -> 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#L1737
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1737:32
|
1737 | 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#L891
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:891:1
|
891 | 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>>`
|
891 ~ impl<F> From<Expression<F>> for ExpressionMid<F> {
892 ~ fn from(val: Expression<F>) -> Self {
893 ~ match val {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_proofs/tests/frontend_backend_split.rs#L602
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/tests/frontend_backend_split.rs:602:40
|
602 | 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#L526
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/tests/frontend_backend_split.rs:526:40
|
526 | 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#L184
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> halo2_proofs/tests/frontend_backend_split.rs:184:33
|
184 | 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#L174
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> halo2_proofs/tests/frontend_backend_split.rs:174:33
|
174 | 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#L62
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/tests/frontend_backend_split.rs:62:10
|
62 | ) -> 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)]`
|
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#L477
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2_proofs/src/plonk/prover.rs:477:29
|
477 | ... &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#L456
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:456:22
|
456 | 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#L455
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> halo2_proofs/src/plonk/prover.rs:455:24
|
455 | 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)]`
|
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#L2292
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2292:22
|
2292 | .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#L2287
warning: redundant closure
--> halo2_proofs/src/plonk/circuit.rs:2287:22
|
2287 | .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#L2126
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:2126:10
|
2126 | ) -> (
| __________^
2127 | | Queries,
2128 | | Vec<Gate<F>>,
2129 | | Vec<lookup::Argument<F>>,
2130 | | Vec<shuffle::Argument<F>>,
2131 | | ) {
| |_____^
|
= 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#L2023
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2023:25
|
2023 | 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#L2022
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/plonk/circuit.rs:2022:37
|
2022 | 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#L1998
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1998:6
|
1998 | ) -> Result<
| ______^
1999 | | (
2000 | | CompiledCircuitV2<F>,
2001 | | ConcreteCircuit::Config,
... |
2004 | | Error,
2005 | | > {
| |_^
|
= 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#L1927
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_proofs/src/plonk/circuit.rs:1927:10
|
1927 | ) -> 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#L1737
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> halo2_proofs/src/plonk/circuit.rs:1737:32
|
1737 | 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#L891
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:891:1
|
891 | 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>>`
|
891 ~ impl<F> From<Expression<F>> for ExpressionMid<F> {
892 ~ fn from(val: Expression<F>) -> Self {
893 ~ match val {
|
|
this `else { if .. }` block can be collapsed:
halo2_proofs/src/plonk/prover.rs#L353
warning: this `else { if .. }` block can be collapsed
--> halo2_proofs/src/plonk/prover.rs:353:24
|
353 | } else {
| ________________________^
354 | | if advice_column.is_some() {
355 | | return Err(Error::Other(format!(
356 | | "expected no advice column with index {} at phase {}",
... |
359 | | }
360 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-W clippy::collapsible-else-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
353 ~ } else if advice_column.is_some() {
354 + return Err(Error::Other(format!(
355 + "expected no advice column with index {} at phase {}",
356 + column_index, current_phase.0
357 + )));
358 ~ };
|
|
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
|
this `else { if .. }` block can be collapsed:
halo2_proofs/src/plonk/prover.rs#L353
warning: this `else { if .. }` block can be collapsed
--> halo2_proofs/src/plonk/prover.rs:353:24
|
353 | } else {
| ________________________^
354 | | if advice_column.is_some() {
355 | | return Err(Error::Other(format!(
356 | | "expected no advice column with index {} at phase {}",
... |
359 | | }
360 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-W clippy::collapsible-else-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
353 ~ } else if advice_column.is_some() {
354 + return Err(Error::Other(format!(
355 + "expected no advice column with index {} at phase {}",
356 + column_index, current_phase.0
357 + )));
358 ~ };
|
|
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/
|