Feat: Deletion / Recovery #325
Triggered via pull request
September 19, 2023 15:19
Status
Failure
Total duration
1h 6m 31s
Artifacts
–
Annotations
2 errors and 105 warnings
Test
Process completed with exit code 101.
|
Coverage
Process completed with exit code 101.
|
unused `async` for function with no await statements:
src/prover/mod.rs#L696
warning: unused `async` for function with no await statements
--> src/prover/mod.rs:696:9
|
696 | / pub async fn new(url: String) -> anyhow::Result<Self> {
697 | | let prove = |Json(payload): Json<InsertionProofInput>| async move {
698 | | match payload.post_root.div_mod(U256::from(2)) {
699 | | (_, y) if y != U256::zero() => {
... |
727 | | Ok(service)
728 | | }
| |_________^
|
= 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/mod.rs:722:22
|
722 | .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)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/task_monitor.rs:45:5
|
45 | / register_histogram!(
46 | | "submitted_batch_sizes",
47 | | "Submitted batch size",
48 | | linear_buckets(f64::from(1), f64::from(1), 100).unwrap()
49 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:37:5
|
37 | / register_gauge!(
38 | | "unprocessed_identities",
39 | | "Identities not processed by identity committer"
40 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:33:5
|
33 | 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)
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L520
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:520:13
|
520 | batch_size as u32,
| ^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
520 | u32::try_from(batch_size),
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L457
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:457:31
|
457 | let pad_index = 2_u32.pow(latest_tree_from_updates.depth() as u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
457 | let pad_index = 2_u32.pow(u32::try_from(latest_tree_from_updates.depth()));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L416
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:416:18
|
416 | .map(|f| f.update.leaf_index as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
416 | .map(|f| u32::try_from(f.update.leaf_index))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many lines (102/100):
src/task_monitor/tasks/process_identities.rs#L395
warning: this function has too many lines (102/100)
--> src/task_monitor/tasks/process_identities.rs:395:1
|
395 | / pub async fn delete_identities(
396 | | database: &Database,
397 | | identity_manager: &IdentityManager,
398 | | batching_tree: &TreeVersion<Intermediate>,
... |
545 | | Ok(())
546 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
|
unnecessary `!=` operation:
src/task_monitor/tasks/process_identities.rs#L186
warning: unnecessary `!=` operation
--> src/task_monitor/tasks/process_identities.rs:186:5
|
186 | / if updates
187 | | .first()
188 | | .context("Updates should be > 1")?
189 | | .update
... |
215 | | delete_identities(database, identity_manager, batching_tree, updates, prover).await?;
216 | | }
| |_____^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `#[warn(clippy::if_not_else)]` implied by `#[warn(clippy::pedantic)]`
|
casting `u64` to `i64` may wrap around the value:
src/task_monitor/tasks/finalize_identities.rs#L304
warning: casting `u64` to `i64` may wrap around the value
--> src/task_monitor/tasks/finalize_identities.rs:304:38
|
304 | Utc::now().timestamp() + root_history_expiry.as_u64() as i64,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::cast_possible_wrap)]` implied by `#[warn(clippy::pedantic)]`
|
redundant closure:
src/task_monitor/tasks/finalize_identities.rs#L285
warning: redundant closure
--> src/task_monitor/tasks/finalize_identities.rs:285:62
|
285 | let commitments: Vec<U256> = commitments.into_iter().map(|c| c.into()).collect();
| ^^^^^^^^^^^^ help: replace the closure with the method itself: `std::convert::Into::into`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
= note: `#[warn(clippy::redundant_closure_for_method_calls)]` implied by `#[warn(clippy::pedantic)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/task_monitor/tasks/finalize_identities.rs#L178
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/task_monitor/tasks/finalize_identities.rs:178:84
|
178 | update_eligible_recoveries(database, identity_manager, processed_tree, &log).await?;
| ^^^^ help: change this to: `log`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
note: the lint level is defined here
--> src/lib.rs:2:9
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L217
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)
|
docs for function which may panic missing `# Panics` section:
src/server/error.rs#L73
warning: docs for function which may panic missing `# Panics` section
--> src/server/error.rs:73:5
|
73 | pub fn to_response(&self) -> hyper::Response<Body> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/server/error.rs:88:9
|
88 | / hyper::Response::builder()
89 | | .status(status_code)
90 | | .body(hyper::Body::from(self.to_string()))
91 | | .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)]`
|
this argument is passed by value, but not consumed in the function body:
src/prover/mod.rs#L358
warning: this argument is passed by value, but not consumed in the function body
--> src/prover/mod.rs:358:30
|
358 | packed_deletion_indices: Vec<u8>,
| ^^^^^^^ help: consider changing the type to: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `#[warn(clippy::needless_pass_by_value)]` implied by `#[warn(clippy::pedantic)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:46:5
|
46 | / register_histogram!(
47 | | "prover_proving_time",
48 | | "Only the time between sending a request and receiving the proof",
49 | | exponential_buckets(0.1, 1.5, 25).unwrap()
50 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:37:5
|
37 | / register_histogram!(
38 | | "total_proving_time",
39 | | "The time to generate a proof in seconds. Includes preparing the data for the prover",
40 | | exponential_buckets(0.1, 1.5, 25).unwrap()
41 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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: `#[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)
|
variables can be used directly in the `format!` string:
src/database/mod.rs#L627
warning: variables can be used directly in the `format!` string
--> src/database/mod.rs:627:21
|
627 | let query = format!(
| _____________________^
628 | | "DELETE FROM deletions WHERE commitment IN ({})",
629 | | placeholders
630 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/contracts/mod.rs#L386
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/contracts/mod.rs:386:38
|
386 | let padding_index = 2u32.pow(self.tree_depth as u32);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: `#[warn(clippy::cast_possible_truncation)]` implied by `#[warn(clippy::pedantic)]`
help: ... or use `try_from` and handle the error accordingly
|
386 | let padding_index = 2u32.pow(u32::try_from(self.tree_depth));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
adding items after statements is confusing, since items exist from the start of the scope:
src/contracts/mod.rs#L378
warning: adding items after statements is confusing, since items exist from the start of the scope
--> src/contracts/mod.rs:378:9
|
378 | use ethers::abi::AbiDecode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `#[warn(clippy::items_after_statements)]` implied by `#[warn(clippy::pedantic)]`
|
variables can be used directly in the `format!` string:
src/contracts/abi.rs#L28
warning: variables can be used directly in the `format!` string
--> src/contracts/abi.rs:28:18
|
28 | _ => panic!("Invalid value for TreeChangeKind: {}", value),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
note: the lint level is defined here
--> src/lib.rs:2:22
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
help: change this to
|
28 - _ => panic!("Invalid value for TreeChangeKind: {}", value),
28 + _ => panic!("Invalid value for TreeChangeKind: {value}"),
|
|
the loop variable `i` is used to index `test_identities`:
tests/delete_padded_identity.rs#L108
warning: the loop variable `i` is used to index `test_identities`
--> tests/delete_padded_identity.rs:108:14
|
108 | for i in 0..insertion_batch_size {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
108 | for (i, <item>) in test_identities.iter().enumerate().take(insertion_batch_size) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
the loop variable `i` is used to index `identities_ref`:
tests/recover_identities.rs#L119
warning: the loop variable `i` is used to index `identities_ref`
--> tests/recover_identities.rs:119:14
|
119 | for i in 0..insertion_batch_size {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
119 | for (i, <item>) in identities_ref.iter().enumerate().take(insertion_batch_size) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
the loop variable `i` is used to index `test_identities`:
tests/delete_identities.rs#L129
warning: the loop variable `i` is used to index `test_identities`
--> tests/delete_identities.rs:129:14
|
129 | for i in 0..deletion_batch_size {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
129 | for (i, <item>) in test_identities.iter().enumerate().take(deletion_batch_size) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `test_identities`:
tests/delete_identities.rs#L108
warning: the loop variable `i` is used to index `test_identities`
--> tests/delete_identities.rs:108:14
|
108 | for i in 0..insertion_batch_size {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
108 | for (i, <item>) in test_identities.iter().enumerate().take(insertion_batch_size) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many arguments (8/7):
tests/common/mod.rs#L354
warning: this function has too many arguments (8/7)
--> tests/common/mod.rs:354:1
|
354 | #[instrument(skip_all)]
| ^----------------------
| |
| _in this procedural macro expansion
| |
355 | | pub async fn test_recover_identity(
356 | | uri: &str,
357 | | client: &Client<HttpConnector>,
... |
363 | | expect_failure: bool,
364 | | ) -> (merkle_tree::Proof<PoseidonHash>, Field) {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/task_monitor.rs:45:5
|
45 | / register_histogram!(
46 | | "submitted_batch_sizes",
47 | | "Submitted batch size",
48 | | linear_buckets(f64::from(1), f64::from(1), 100).unwrap()
49 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:37:5
|
37 | / register_gauge!(
38 | | "unprocessed_identities",
39 | | "Identities not processed by identity committer"
40 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:33:5
|
33 | 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)
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L520
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:520:13
|
520 | batch_size as u32,
| ^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
520 | u32::try_from(batch_size),
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L457
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:457:31
|
457 | let pad_index = 2_u32.pow(latest_tree_from_updates.depth() as u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
457 | let pad_index = 2_u32.pow(u32::try_from(latest_tree_from_updates.depth()));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L416
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:416:18
|
416 | .map(|f| f.update.leaf_index as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
416 | .map(|f| u32::try_from(f.update.leaf_index))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many lines (102/100):
src/task_monitor/tasks/process_identities.rs#L395
warning: this function has too many lines (102/100)
--> src/task_monitor/tasks/process_identities.rs:395:1
|
395 | / pub async fn delete_identities(
396 | | database: &Database,
397 | | identity_manager: &IdentityManager,
398 | | batching_tree: &TreeVersion<Intermediate>,
... |
545 | | Ok(())
546 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
|
unnecessary `!=` operation:
src/task_monitor/tasks/process_identities.rs#L186
warning: unnecessary `!=` operation
--> src/task_monitor/tasks/process_identities.rs:186:5
|
186 | / if updates
187 | | .first()
188 | | .context("Updates should be > 1")?
189 | | .update
... |
215 | | delete_identities(database, identity_manager, batching_tree, updates, prover).await?;
216 | | }
| |_____^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `#[warn(clippy::if_not_else)]` implied by `#[warn(clippy::pedantic)]`
|
casting `u64` to `i64` may wrap around the value:
src/task_monitor/tasks/finalize_identities.rs#L304
warning: casting `u64` to `i64` may wrap around the value
--> src/task_monitor/tasks/finalize_identities.rs:304:38
|
304 | Utc::now().timestamp() + root_history_expiry.as_u64() as i64,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::cast_possible_wrap)]` implied by `#[warn(clippy::pedantic)]`
|
redundant closure:
src/task_monitor/tasks/finalize_identities.rs#L285
warning: redundant closure
--> src/task_monitor/tasks/finalize_identities.rs:285:62
|
285 | let commitments: Vec<U256> = commitments.into_iter().map(|c| c.into()).collect();
| ^^^^^^^^^^^^ help: replace the closure with the method itself: `std::convert::Into::into`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
= note: `#[warn(clippy::redundant_closure_for_method_calls)]` implied by `#[warn(clippy::pedantic)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/task_monitor.rs:45:5
|
45 | / register_histogram!(
46 | | "submitted_batch_sizes",
47 | | "Submitted batch size",
48 | | linear_buckets(f64::from(1), f64::from(1), 100).unwrap()
49 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:37:5
|
37 | / register_gauge!(
38 | | "unprocessed_identities",
39 | | "Identities not processed by identity committer"
40 | | )
| |_____^
|
= 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)
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/task_monitor/tasks/finalize_identities.rs#L178
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/task_monitor/tasks/finalize_identities.rs:178:84
|
178 | update_eligible_recoveries(database, identity_manager, processed_tree, &log).await?;
| ^^^^ help: change this to: `log`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
note: the lint level is defined here
--> src/lib.rs:2:9
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L546
warning: matching over `()` is more explicit
--> src/task_monitor.rs:33:5
|
33 | 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)
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L520
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:520:13
|
520 | batch_size as u32,
| ^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
520 | u32::try_from(batch_size),
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L457
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:457:31
|
457 | let pad_index = 2_u32.pow(latest_tree_from_updates.depth() as u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
457 | let pad_index = 2_u32.pow(u32::try_from(latest_tree_from_updates.depth()));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/task_monitor/tasks/process_identities.rs#L416
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/task_monitor/tasks/process_identities.rs:416:18
|
416 | .map(|f| f.update.leaf_index as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
416 | .map(|f| u32::try_from(f.update.leaf_index))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many lines (102/100):
src/task_monitor/tasks/process_identities.rs#L395
warning: this function has too many lines (102/100)
--> src/task_monitor/tasks/process_identities.rs:395:1
|
395 | / pub async fn delete_identities(
396 | | database: &Database,
397 | | identity_manager: &IdentityManager,
398 | | batching_tree: &TreeVersion<Intermediate>,
... |
545 | | Ok(())
546 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
|
unnecessary `!=` operation:
src/task_monitor/tasks/process_identities.rs#L186
warning: unnecessary `!=` operation
--> src/task_monitor/tasks/process_identities.rs:186:5
|
186 | / if updates
187 | | .first()
188 | | .context("Updates should be > 1")?
189 | | .update
... |
215 | | delete_identities(database, identity_manager, batching_tree, updates, prover).await?;
216 | | }
| |_____^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `#[warn(clippy::if_not_else)]` implied by `#[warn(clippy::pedantic)]`
|
casting `u64` to `i64` may wrap around the value:
src/task_monitor/tasks/finalize_identities.rs#L304
warning: casting `u64` to `i64` may wrap around the value
--> src/task_monitor/tasks/finalize_identities.rs:304:38
|
304 | Utc::now().timestamp() + root_history_expiry.as_u64() as i64,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::cast_possible_wrap)]` implied by `#[warn(clippy::pedantic)]`
|
redundant closure:
src/task_monitor/tasks/finalize_identities.rs#L285
warning: redundant closure
--> src/task_monitor/tasks/finalize_identities.rs:285:62
|
285 | let commitments: Vec<U256> = commitments.into_iter().map(|c| c.into()).collect();
| ^^^^^^^^^^^^ help: replace the closure with the method itself: `std::convert::Into::into`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
= note: `#[warn(clippy::redundant_closure_for_method_calls)]` implied by `#[warn(clippy::pedantic)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/task_monitor/tasks/finalize_identities.rs#L178
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/task_monitor/tasks/finalize_identities.rs:178:84
|
178 | update_eligible_recoveries(database, identity_manager, processed_tree, &log).await?;
| ^^^^ help: change this to: `log`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
note: the lint level is defined here
--> src/lib.rs:2:9
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L217
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)
|
docs for function which may panic missing `# Panics` section:
src/server/error.rs#L73
warning: docs for function which may panic missing `# Panics` section
--> src/server/error.rs:73:5
|
73 | pub fn to_response(&self) -> hyper::Response<Body> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/server/error.rs:88:9
|
88 | / hyper::Response::builder()
89 | | .status(status_code)
90 | | .body(hyper::Body::from(self.to_string()))
91 | | .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)]`
|
this argument is passed by value, but not consumed in the function body:
src/prover/mod.rs#L358
warning: this argument is passed by value, but not consumed in the function body
--> src/prover/mod.rs:358:30
|
358 | packed_deletion_indices: Vec<u8>,
| ^^^^^^^ help: consider changing the type to: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `#[warn(clippy::needless_pass_by_value)]` implied by `#[warn(clippy::pedantic)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:46:5
|
46 | / register_histogram!(
47 | | "prover_proving_time",
48 | | "Only the time between sending a request and receiving the proof",
49 | | exponential_buckets(0.1, 1.5, 25).unwrap()
50 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:37:5
|
37 | / register_histogram!(
38 | | "total_proving_time",
39 | | "The time to generate a proof in seconds. Includes preparing the data for the prover",
40 | | exponential_buckets(0.1, 1.5, 25).unwrap()
41 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L217
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)
|
docs for function which may panic missing `# Panics` section:
src/server/error.rs#L73
warning: docs for function which may panic missing `# Panics` section
--> src/server/error.rs:73:5
|
73 | pub fn to_response(&self) -> hyper::Response<Body> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/server/error.rs:88:9
|
88 | / hyper::Response::builder()
89 | | .status(status_code)
90 | | .body(hyper::Body::from(self.to_string()))
91 | | .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)]`
|
this argument is passed by value, but not consumed in the function body:
src/prover/mod.rs#L358
warning: this argument is passed by value, but not consumed in the function body
--> src/prover/mod.rs:358:30
|
358 | packed_deletion_indices: Vec<u8>,
| ^^^^^^^ help: consider changing the type to: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `#[warn(clippy::needless_pass_by_value)]` implied by `#[warn(clippy::pedantic)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:46:5
|
46 | / register_histogram!(
47 | | "prover_proving_time",
48 | | "Only the time between sending a request and receiving the proof",
49 | | exponential_buckets(0.1, 1.5, 25).unwrap()
50 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
warning: matching over `()` is more explicit
--> src/prover/mod.rs:37:5
|
37 | / register_histogram!(
38 | | "total_proving_time",
39 | | "The time to generate a proof in seconds. Includes preparing the data for the prover",
40 | | exponential_buckets(0.1, 1.5, 25).unwrap()
41 | | )
| |_____^
|
= 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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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: `#[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)
|
variables can be used directly in the `format!` string:
src/database/mod.rs#L627
warning: variables can be used directly in the `format!` string
--> src/database/mod.rs:627:21
|
627 | let query = format!(
| _____________________^
628 | | "DELETE FROM deletions WHERE commitment IN ({})",
629 | | placeholders
630 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/contracts/mod.rs#L386
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/contracts/mod.rs:386:38
|
386 | let padding_index = 2u32.pow(self.tree_depth as u32);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: `#[warn(clippy::cast_possible_truncation)]` implied by `#[warn(clippy::pedantic)]`
help: ... or use `try_from` and handle the error accordingly
|
386 | let padding_index = 2u32.pow(u32::try_from(self.tree_depth));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
adding items after statements is confusing, since items exist from the start of the scope:
src/contracts/mod.rs#L378
warning: adding items after statements is confusing, since items exist from the start of the scope
--> src/contracts/mod.rs:378:9
|
378 | use ethers::abi::AbiDecode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `#[warn(clippy::items_after_statements)]` implied by `#[warn(clippy::pedantic)]`
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L920
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)
|
matching over `()` is more explicit:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prometheus-0.13.3/src/macros.rs#L364
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: `#[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)
|
variables can be used directly in the `format!` string:
src/database/mod.rs#L627
warning: variables can be used directly in the `format!` string
--> src/database/mod.rs:627:21
|
627 | let query = format!(
| _____________________^
628 | | "DELETE FROM deletions WHERE commitment IN ({})",
629 | | placeholders
630 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
variables can be used directly in the `format!` string:
src/contracts/abi.rs#L28
warning: variables can be used directly in the `format!` string
--> src/contracts/abi.rs:28:18
|
28 | _ => panic!("Invalid value for TreeChangeKind: {}", value),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
note: the lint level is defined here
--> src/lib.rs:2:22
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
help: change this to
|
28 - _ => panic!("Invalid value for TreeChangeKind: {}", value),
28 + _ => panic!("Invalid value for TreeChangeKind: {value}"),
|
|
casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers:
src/contracts/mod.rs#L386
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
--> src/contracts/mod.rs:386:38
|
386 | let padding_index = 2u32.pow(self.tree_depth as u32);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: `#[warn(clippy::cast_possible_truncation)]` implied by `#[warn(clippy::pedantic)]`
help: ... or use `try_from` and handle the error accordingly
|
386 | let padding_index = 2u32.pow(u32::try_from(self.tree_depth));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
adding items after statements is confusing, since items exist from the start of the scope:
src/contracts/mod.rs#L378
warning: adding items after statements is confusing, since items exist from the start of the scope
--> src/contracts/mod.rs:378:9
|
378 | use ethers::abi::AbiDecode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `#[warn(clippy::items_after_statements)]` implied by `#[warn(clippy::pedantic)]`
|
variables can be used directly in the `format!` string:
src/contracts/abi.rs#L28
warning: variables can be used directly in the `format!` string
--> src/contracts/abi.rs:28:18
|
28 | _ => panic!("Invalid value for TreeChangeKind: {}", value),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
note: the lint level is defined here
--> src/lib.rs:2:22
|
2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
help: change this to
|
28 - _ => panic!("Invalid value for TreeChangeKind: {}", value),
28 + _ => panic!("Invalid value for TreeChangeKind: {value}"),
|
|
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/install@v0.1, actions-rs/cargo@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/
|
Lint
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/
|
Lint
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/
|
Lint
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/
|
Lint
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/
|
Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test
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/
|
Test
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/
|
Test
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/
|
Test
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/
|
Coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Coverage
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/
|
Coverage
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/
|
Coverage
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/
|
Coverage
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/
|