Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.
GitHub Actions / Clippy failed Sep 3, 2023 in 1s

Clippy

24 errors

Details

Results

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

Versions

  • rustc 1.71.0-nightly (7f94b314c 2023-04-23)
  • cargo 1.71.0-nightly (de80432f0 2023-04-21)
  • clippy 0.1.70 (7f94b31 2023-04-23)

Annotations

Check failure on line 1412 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused `std::result::Result` that must be used

error: unused `std::result::Result` that must be used
    --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65
     |
1401 |       ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{
     |  _________________________________________________________________^
1402 | |         use halo2_proofs::circuit::Value;
1403 | |         let description =
1404 | |             $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value));
...    |
1411 | |         )
1412 | |     }};
     | |_____^
     |
    ::: zkevm-circuits/src/taiko_pi_circuit.rs:430:17
     |
430  |                   assign!(region, self.block_hash.2, 0 => evidence.assignment_acc(BLOCK_HASH, evm_word));
     |                   -------------------------------------------------------------------------------------- in this macro invocation
     |
     = note: this `Result` may be an `Err` variant, which should be handled
     = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
1401 |     ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = {
     |                                                                 +++++++

Check failure on line 1412 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused `std::result::Result` that must be used

error: unused `std::result::Result` that must be used
    --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65
     |
1401 |       ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{
     |  _________________________________________________________________^
1402 | |         use halo2_proofs::circuit::Value;
1403 | |         let description =
1404 | |             $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value));
...    |
1411 | |         )
1412 | |     }};
     | |_____^
     |
    ::: zkevm-circuits/src/taiko_pi_circuit.rs:429:17
     |
429  |                   assign!(region, self.block_hash.0, 0 => (evidence.block_context.number).as_u64().scalar());
     |                   ------------------------------------------------------------------------------------------ in this macro invocation
     |
     = note: this `Result` may be an `Err` variant, which should be handled
     = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
1401 |     ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = {
     |                                                                 +++++++

Check failure on line 1412 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused `std::result::Result` that must be used

error: unused `std::result::Result` that must be used
    --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65
     |
1401 |       ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{
     |  _________________________________________________________________^
1402 | |         use halo2_proofs::circuit::Value;
1403 | |         let description =
1404 | |             $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value));
...    |
1411 | |         )
1412 | |     }};
     | |_____^
     |
    ::: zkevm-circuits/src/taiko_pi_circuit.rs:428:17
     |
428  |                   assign!(region, self.parent_hash.2, 0 => evidence.assignment_acc(PARENT_HASH, evm_word));
     |                   ---------------------------------------------------------------------------------------- in this macro invocation
     |
     = note: this `Result` may be an `Err` variant, which should be handled
     = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
1401 |     ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = {
     |                                                                 +++++++

Check failure on line 1412 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused `std::result::Result` that must be used

error: unused `std::result::Result` that must be used
    --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65
     |
1401 |       ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{
     |  _________________________________________________________________^
1402 | |         use halo2_proofs::circuit::Value;
1403 | |         let description =
1404 | |             $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value));
...    |
1411 | |         )
1412 | |     }};
     | |_____^
     |
    ::: zkevm-circuits/src/taiko_pi_circuit.rs:427:17
     |
427  |                   assign!(region, self.parent_hash.0, 0 => (evidence.block_context.number - 1).as_u64().scalar());
     |                   ----------------------------------------------------------------------------------------------- in this macro invocation
     |
     = note: this `Result` may be an `Err` variant, which should be handled
     = note: `-D unused-must-use` implied by `-D warnings`
     = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
1401 |     ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = {
     |                                                                 +++++++

Check failure on line 161 in zkevm-circuits/src/circuit_tools/memory.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

using `clone` on type `C` which implements the `Copy` trait

error: using `clone` on type `C` which implements the `Copy` trait
   --> zkevm-circuits/src/circuit_tools/memory.rs:161:38
    |
161 |                 cm.get_typed_columns(t.clone())[0].column
    |                                      ^^^^^^^^^ help: try dereferencing it: `*t`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 159 in zkevm-circuits/src/circuit_tools/memory.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

using `clone` on type `C` which implements the `Copy` trait

error: using `clone` on type `C` which implements the `Copy` trait
   --> zkevm-circuits/src/circuit_tools/memory.rs:159:31
    |
159 |                 let config = (t.clone(), 1usize, phase, false);
    |                               ^^^^^^^^^ help: try dereferencing it: `*t`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 108 in zkevm-circuits/src/circuit_tools/memory.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

iterating on a map's values

error: iterating on a map's values
   --> zkevm-circuits/src/circuit_tools/memory.rs:108:9
    |
108 |         self.banks.iter().map(|(_, bank)| bank.tag().0).collect()
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.banks.values().map(|bank| bank.tag().0)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
    = note: `-D clippy::iter-kv-map` implied by `-D warnings`

Check failure on line 269 in zkevm-circuits/src/circuit_tools/cell_manager.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

length comparison to zero

error: length comparison to zero
   --> zkevm-circuits/src/circuit_tools/cell_manager.rs:269:12
    |
269 |         if self.get_typed_columns(config.0).len() != 0 {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_typed_columns(config.0).is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
    = note: `-D clippy::len-zero` implied by `-D warnings`

Check failure on line 255 in zkevm-circuits/src/circuit_tools/cell_manager.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

field assignment outside of initializer for an instance created with Default::default()

error: field assignment outside of initializer for an instance created with Default::default()
   --> zkevm-circuits/src/circuit_tools/cell_manager.rs:255:9
    |
255 |         cm.height_limit = max_height;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `CellManager::<F, C> { height_limit: max_height, ..Default::default() }` and removing relevant reassignments
   --> zkevm-circuits/src/circuit_tools/cell_manager.rs:254:9
    |
254 |         let mut cm = CellManager::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
    = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`

Check failure on line 609 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:609:45
    |
609 |                 .map(|_v| local_compression(&values))
    |                                             ^^^^^^^ help: change this to: `values`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 606 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:606:53
    |
606 |             (true, false) => vec![local_compression(&values)],            
    |                                                     ^^^^^^^ help: change this to: `values`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 605 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:605:52
    |
605 |             (true, true) => vec![local_compression(&values)],
    |                                                    ^^^^^^^ help: change this to: `values`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 589 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:589:33
    |
589 |             let rlc = rlc::expr(&values, challenge.expr()) * local_condition.expr();
    |                                 ^^^^^^^ help: change this to: `values`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 550 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

this function has too many arguments (8/7)

error: this function has too many arguments (8/7)
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:541:5
    |
541 | /     pub(crate) fn add_lookup(
542 | |         &mut self,
543 | |         description: &'static str,
544 | |         tag: C,
...   |
549 | |         dyn_path: bool,
550 | |     ) {
    | |______^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `-D clippy::too-many-arguments` implied by `-D warnings`

Check failure on line 463 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

use of `expect` followed by a function call

error: use of `expect` followed by a function call
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:460:26
    |
460 |                           .expect(&format!(
    |  __________________________^
461 | |                             "Fixed table {:?} not found for dynamic lookup",
462 | |                             table_tag
463 | |                         ))
    | |__________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
    = note: `-D clippy::expect-fun-call` implied by `-D warnings`
help: try this
    |
460 ~                         .unwrap_or_else(|| panic!("Fixed table {:?} not found for dynamic lookup",
461 +                             table_tag))
    |

Check failure on line 422 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:422:40
    |
422 |             let table_expr = rlc::expr(&table, challenge.expr());
    |                                        ^^^^^^ help: change this to: `table`
    |
    = 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`

Check failure on line 409 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

using `clone` on type `Column<Advice>` which implements the `Copy` trait

error: using `clone` on type `Column<Advice>` which implements the `Copy` trait
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:409:38
    |
409 |                 meta.enable_equality(c.clone())});
    |                                      ^^^^^^^^^ help: try dereferencing it: `*c`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 212 in zkevm-circuits/src/circuit_tools/constraint_builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

using `clone` on type `C` which implements the `Copy` trait

error: using `clone` on type `C` which implements the `Copy` trait
   --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:212:42
    |
212 |                 self.fixed_tables.insert(tag.clone(), table.table_exprs(meta));
    |                                          ^^^^^^^^^^^ help: try dereferencing it: `*tag`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
    = note: `-D clippy::clone-on-copy` implied by `-D warnings`

Check failure on line 20 in zkevm-circuits/src/taiko_pi_circuit.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused import: `ExprVec`

error: unused import: `ExprVec`
  --> zkevm-circuits/src/taiko_pi_circuit.rs:20:84
   |
20 | use crate::circuit_tools::constraint_builder::{ConstraintBuilder, TO_FIX, RLCable, ExprVec};
   |                                                                                    ^^^^^^^

Check failure on line 10 in zkevm-circuits/src/taiko_pi_circuit.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused import: `itertools::Itertools`

error: unused import: `itertools::Itertools`
  --> zkevm-circuits/src/taiko_pi_circuit.rs:10:5
   |
10 | use itertools::Itertools;
   |     ^^^^^^^^^^^^^^^^^^^^

Check failure on line 26 in zkevm-circuits/src/taiko_pi_circuit.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused import: `LookupTable`

error: unused import: `LookupTable`
  --> zkevm-circuits/src/taiko_pi_circuit.rs:26:90
   |
26 | use crate::table::{byte_table::ByteTable, BlockContextFieldTag, BlockTable, KeccakTable, LookupTable};
   |                                                                                          ^^^^^^^^^^^

Check failure on line 13 in zkevm-circuits/src/circuit_tools/memory.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused import: `itertools::Itertools`

error: unused import: `itertools::Itertools`
  --> zkevm-circuits/src/circuit_tools/memory.rs:13:5
   |
13 | use itertools::Itertools;
   |     ^^^^^^^^^^^^^^^^^^^^

Check failure on line 472 in zkevm-circuits/src/taiko_pi_circuit.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

redundant field names in struct initialization

error: redundant field names in struct initialization
   --> zkevm-circuits/src/taiko_pi_circuit.rs:472:13
    |
472 |             evidence: evidence,
    |             ^^^^^^^^^^^^^^^^^^ help: replace it with: `evidence`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `-D clippy::redundant-field-names` implied by `-D warnings`

Check failure on line 4 in zkevm-circuits/src/taiko_pi_circuit.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy

unused import: `H256`

error: unused import: `H256`
 --> zkevm-circuits/src/taiko_pi_circuit.rs:4:45
  |
4 | use eth_types::{Field, ToBigEndian, ToWord, H256, H160, U256};
  |                                             ^^^^
  |
  = note: `-D unused-imports` implied by `-D warnings`