Skip to content
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy succeeded Sep 7, 2023 in 1s

clippy

75 warnings

Details

Results

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

Versions

  • rustc 1.74.0-nightly (4e78abb43 2023-08-28)
  • cargo 1.74.0-nightly (925280f02 2023-08-25)
  • clippy 0.1.73 (4e78abb 2023-08-28)

Annotations

Check warning on line 582 in src/prover/batch_insertion/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
   --> src/prover/batch_insertion/mod.rs:550:9
    |
550 | /         pub async fn new(url: String) -> anyhow::Result<Self> {
551 | |             let prove = |Json(payload): Json<ProofInput>| async move {
552 | |                 match payload.post_root.div_mod(U256::from(2)) {
553 | |                     (_, y) if y != U256::zero() => {
...   |
581 | |             Ok(service)
582 | |         }
    | |_________^
    |
    = help: consider removing the `async` from this function
note: `await` used in an async block, which does not require the enclosing function to be `async`
   --> src/prover/batch_insertion/mod.rs:576:22
    |
576 |                     .await
    |                      ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
    = note: `#[warn(clippy::unused_async)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 104 in src/utils/async_queue.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
   --> src/utils/async_queue.rs:104:17
    |
104 |                 _ = self.inner.pop_notify.notified() => {}
    |                 ^ help: use `()` instead of `_`: `()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 103 in src/utils/async_queue.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
   --> src/utils/async_queue.rs:103:17
    |
103 |                 _ = self.inner.push_notify.notified() => {}
    |                 ^ help: use `()` instead of `_`: `()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 64 in src/utils/async_queue.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/utils/async_queue.rs:64:17
   |
64 |                 _ = self.inner.pop_notify.notified() => {}
   |                 ^ help: use `()` instead of `_`: `()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 63 in src/utils/async_queue.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/utils/async_queue.rs:63:17
   |
63 |                 _ = self.inner.push_notify.notified() => {}
   |                 ^ help: use `()` instead of `_`: `()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/task_monitor.rs:56:5
   |
56 | /     register_histogram!(
57 | |         "submitted_batch_sizes",
58 | |         "Submitted batch size",
59 | |         linear_buckets(f64::from(1), f64::from(1), 100).unwrap()
60 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 546 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/task_monitor.rs:48:5
   |
48 | /     register_gauge!(
49 | |         "unprocessed_identities",
50 | |         "Identities not processed by identity committer"
51 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `__register_gauge` which comes from the expansion of the macro `register_gauge` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 546 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/task_monitor.rs:44:5
   |
44 |     register_gauge!("pending_identities", "Identities not submitted on-chain").unwrap()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `__register_gauge` which comes from the expansion of the macro `register_gauge` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 231 in src/task_monitor/tasks/process_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

it is more concise to loop over references to containers instead of using explicit iteration methods

warning: it is more concise to loop over references to containers instead of using explicit iteration methods
   --> src/task_monitor/tasks/process_identities.rs:231:19
    |
231 |     for update in updates[1..].iter() {
    |                   ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&updates[1..]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop

Check warning on line 144 in src/task_monitor/tasks/process_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
   --> src/task_monitor/tasks/process_identities.rs:144:13
    |
144 |             _ = wake_up_notify.notified() => {
    |             ^ help: use `()` instead of `_`: `()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/task_monitor/tasks/process_identities.rs:28:5
   |
28 | /     register_histogram!(
29 | |         "pending_identities_channel_capacity",
30 | |         "Pending identities channel capacity"
31 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 89 in src/task_monitor/tasks/mine_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> src/task_monitor/tasks/mine_identities.rs:86:9
   |
86 | /         panic!(
87 | |             "Transaction {} failed on chain - sequencer will crash and restart",
88 | |             transaction_id
89 | |         );
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 157 in src/task_monitor/tasks/finalize_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

passing a unit value to a function

warning: passing a unit value to a function
   --> src/task_monitor/tasks/finalize_identities.rs:146:5
    |
146 | /     Ok(for root in all_roots {
147 | |         info!(?root, "Finalizing root");
148 | |
149 | |         let is_root_finalized = identity_manager.is_root_mined_multi_chain(root).await?;
...   |
156 | |         }
157 | |     })
    | |______^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
note: the lint level is defined here
   --> src/lib.rs:2:9
    |
2   | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
    |         ^^^^^^^^^^^
    = note: `#[warn(clippy::unit_arg)]` implied by `#[warn(clippy::all)]`
help: move the expression in front of the call and replace it with the unit literal `()`
    |
146 ~     for root in all_roots {
147 +         info!(?root, "Finalizing root");
148 + 
149 +         let is_root_finalized = identity_manager.is_root_mined_multi_chain(root).await?;
150 + 
151 +         if is_root_finalized {
152 +             finalized_tree.apply_updates_up_to(root.into());
153 +             database.mark_root_as_mined(&root.into()).await?;
154 + 
155 +             info!(?root, "Root finalized");
156 +         }
157 +     };
158 +     Ok(())
    |

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/server/custom_middleware/api_metrics_layer.rs:23:5
   |
23 |     register_histogram!("api_latency_seconds", "The API latency in seconds.").unwrap()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 364 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/server/custom_middleware/api_metrics_layer.rs:14:5
   |
14 | /     register_int_counter_vec!(
15 | |         "api_response_status",
16 | |         "The API responses by status code.",
17 | |         &["status_code"]
18 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `__register_counter_vec` which comes from the expansion of the macro `register_int_counter_vec` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 217 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/server/custom_middleware/api_metrics_layer.rs:11:18
   |
11 |     Lazy::new(|| register_counter!(opts!("api_requests", "Number of requests received.")).unwrap());
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_counter` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 67 in src/server/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
  --> src/server/error.rs:67:5
   |
67 |     pub fn to_response(&self) -> hyper::Response<Body> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> src/server/error.rs:82:9
   |
82 | /         hyper::Response::builder()
83 | |             .status(status_code)
84 | |             .body(hyper::Body::from(self.to_string()))
85 | |             .expect("Failed to convert error string into hyper::Body")
   | |______________________________________________________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
   = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 241 in src/prover/batch_insertion/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

it is more concise to loop over references to containers instead of using explicit iteration methods

warning: it is more concise to loop over references to containers instead of using explicit iteration methods
   --> src/prover/batch_insertion/mod.rs:241:23
    |
241 |     for commitment in identity_commitments.iter() {
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `identity_commitments`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
    = note: `#[warn(clippy::explicit_iter_loop)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/prover/batch_insertion/mod.rs:33:5
   |
33 | /     register_histogram!(
34 | |         "prover_proving_time",
35 | |         "Only the time between sending a request and receiving the proof",
36 | |         exponential_buckets(0.1, 1.5, 25).unwrap()
37 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/prover/batch_insertion/mod.rs:24:5
   |
24 | /     register_histogram!(
25 | |         "total_proving_time",
26 | |         "The time to generate a proof in seconds. Includes preparing the data for the prover",
27 | |         exponential_buckets(0.1, 1.5, 25).unwrap()
28 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 364 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/ethereum/write_oz/openzeppelin.rs:19:5
   |
19 | /     register_int_counter_vec!("eth_tx_count", "The transaction count by bytes4.", &[
20 | |         "bytes4"
21 | |     ])
   | |______^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `__register_counter_vec` which comes from the expansion of the macro `register_int_counter_vec` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 920 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/ethereum/read/rpc_logger.rs:20:5
   |
20 | /     register_histogram!(
21 | |         "eth_rpc_latency_seconds",
22 | |         "The Ethereum provider latency in seconds."
23 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
   = note: this warning originates in the macro `register_histogram` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 364 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> src/ethereum/read/rpc_logger.rs:12:5
   |
12 | /     register_int_counter_vec!(
13 | |         "eth_rpc_requests",
14 | |         "Number of Ethereum provider requests made by method.",
15 | |         &["method"]
16 | |     )
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
note: the lint level is defined here
  --> src/lib.rs:2:22
   |
2  | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
   |                      ^^^^^^^^^^^^^^^^
   = note: `#[warn(clippy::ignored_unit_patterns)]` implied by `#[warn(clippy::pedantic)]`
   = note: this warning originates in the macro `__register_counter_vec` which comes from the expansion of the macro `register_int_counter_vec` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 12 in src/task_monitor/tasks/finalize_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `WorldId`

warning: unused import: `WorldId`
  --> src/task_monitor/tasks/finalize_identities.rs:12:81
   |
12 | use crate::contracts::abi::{BridgedWorldId, RootAddedFilter, TreeChangedFilter, WorldId};
   |                                                                                 ^^^^^^^

Check warning on line 9 in src/task_monitor/tasks/finalize_identities.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `H256`

warning: unused import: `H256`
 --> src/task_monitor/tasks/finalize_identities.rs:9:56
  |
9 | use ethers::types::{Address, Log, Topic, ValueOrArray, H256, U256};
  |                                                        ^^^^
  |
  = note: `#[warn(unused_imports)]` on by default