clippy
20 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 20 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0-nightly (3cbb93223 2024-03-13)
- cargo 1.78.0-nightly (7065f0ef4 2024-03-12)
- clippy 0.1.78 (3cbb932 2024-03-13)
Annotations
Check failure on line 51 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:51:37
|
51 | pub fn custom<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
Check failure on line 46 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:46:46
|
46 | pub fn secrets_manager<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
Check failure on line 41 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:41:36
|
41 | pub fn parse<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
Check failure on line 36 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:36:35
|
36 | pub fn http<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
Check failure on line 31 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:31:33
|
31 | pub fn db<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
Check failure on line 26 in funds-manager/src/error.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
error: this argument is passed by value, but not consumed in the function body
--> funds-manager/src/error.rs:26:39
|
26 | pub fn arbitrum<T: ToString>(msg: T) -> FundsManagerError {
| ^ help: consider taking a reference instead: `&T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: requested on the command line with `-D clippy::needless-pass-by-value`
Check failure on line 133 in funds-manager/src/relayer_client.rs
github-actions / clippy
methods `create_new_wallet` and `redeem_note` are never used
error: methods `create_new_wallet` and `redeem_note` are never used
--> funds-manager/src/relayer_client.rs:133:25
|
57 | impl RelayerClient {
| ------------------ methods in this implementation
...
133 | pub(crate) async fn create_new_wallet(&self, wallet: Wallet) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^^^^^^^^
...
141 | pub(crate) async fn redeem_note(
| ^^^^^^^^^^^
Check failure on line 30 in funds-manager/src/indexer/redeem_fees.rs
github-actions / clippy
multiple methods are never used
error: multiple methods are never used
--> funds-manager/src/indexer/redeem_fees.rs:30:18
|
28 | impl Indexer {
| ------------ methods in this implementation
29 | /// Redeem the most valuable open fees
30 | pub async fn redeem_fees(&mut self) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^^
...
66 | async fn get_or_create_wallet(
| ^^^^^^^^^^^^^^^^^^^^
...
86 | async fn create_new_wallet(&mut self) -> Result<WalletMetadata, FundsManagerError> {
| ^^^^^^^^^^^^^^^^^
...
101 | async fn create_renegade_wallet(
| ^^^^^^^^^^^^^^^^^^^^^^
...
124 | pub async fn redeem_note_into_wallet(
| ^^^^^^^^^^^^^^^^^^^^^^^
...
153 | async fn maybe_mark_redeemed(
| ^^^^^^^^^^^^^^^^^^^
...
180 | async fn create_secrets_manager_entry(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
206 | async fn get_wallet_private_key(
| ^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 26 in funds-manager/src/indexer/redeem_fees.rs
github-actions / clippy
constant `MAX_FEES_REDEEMED` is never used
error: constant `MAX_FEES_REDEEMED` is never used
--> funds-manager/src/indexer/redeem_fees.rs:26:18
|
26 | pub(crate) const MAX_FEES_REDEEMED: usize = 20;
| ^^^^^^^^^^^^^^^^^
Check failure on line 78 in funds-manager/src/indexer/queries.rs
github-actions / clippy
multiple methods are never used
error: multiple methods are never used
--> funds-manager/src/indexer/queries.rs:78:19
|
72 | impl Indexer {
| ------------ methods in this implementation
...
78 | pub(crate) fn get_latest_block(&mut self) -> Result<u64, FundsManagerError> {
| ^^^^^^^^^^^^^^^^
...
93 | pub(crate) fn update_latest_block(
| ^^^^^^^^^^^^^^^^^^^
...
110 | pub(crate) fn insert_fee(&mut self, fee: NewFee) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^
...
119 | pub(crate) fn get_unredeemed_fee_mints(&mut self) -> Result<Vec<String>, FundsManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
131 | pub(crate) fn mark_fee_as_redeemed(&mut self, tx_hash: &str) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^^^^^^^^^^^
...
143 | pub(crate) fn get_most_valuable_fees(
| ^^^^^^^^^^^^^^^^^^^^^^
...
189 | pub(crate) fn get_wallet_for_mint(
| ^^^^^^^^^^^^^^^^^^^
...
202 | pub(crate) fn find_wallet_with_empty_balance(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
215 | pub(crate) fn insert_wallet(
| ^^^^^^^^^^^^^
Check failure on line 55 in funds-manager/src/indexer/queries.rs
github-actions / clippy
fields `tx_hash`, `mint`, and `receiver` are never read
error: fields `tx_hash`, `mint`, and `receiver` are never read
--> funds-manager/src/indexer/queries.rs:55:9
|
52 | pub(crate) struct FeeValue {
| -------- fields in this struct
...
55 | pub tx_hash: String,
| ^^^^^^^
...
58 | pub mint: String,
| ^^^^
...
61 | pub receiver: String,
| ^^^^^^^^
|
= note: `FeeValue` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check failure on line 33 in funds-manager/src/indexer/queries.rs
github-actions / clippy
constant `LAST_INDEXED_BLOCK_KEY` is never used
error: constant `LAST_INDEXED_BLOCK_KEY` is never used
--> funds-manager/src/indexer/queries.rs:33:18
|
33 | pub(crate) const LAST_INDEXED_BLOCK_KEY: &str = "latest_block";
| ^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 28 in funds-manager/src/indexer/index_fees.rs
github-actions / clippy
multiple methods are never used
error: multiple methods are never used
--> funds-manager/src/indexer/index_fees.rs:28:18
|
26 | impl Indexer {
| ------------ methods in this implementation
27 | /// Index all fees since the given block
28 | pub async fn index_fees(&mut self) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^
...
59 | async fn index_note(
| ^^^^^^^^^^
...
96 | pub(crate) async fn get_note_from_tx(
| ^^^^^^^^^^^^^^^^
...
107 | pub(crate) async fn get_note_from_tx_with_key(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
...
118 | async fn get_ciphertext_from_tx(
| ^^^^^^^^^^^^^^^^^^^^^^
...
152 | fn decrypt_note(
| ^^^^^^^^^^^^
...
169 | fn decrypt_note_with_key(
| ^^^^^^^^^^^^^^^^^^^^^
Check failure on line 34 in funds-manager/src/indexer/mod.rs
github-actions / clippy
associated items `new` and `get_key_for_receiver` are never used
error: associated items `new` and `get_key_for_receiver` are never used
--> funds-manager/src/indexer/mod.rs:34:12
|
32 | impl Indexer {
| ------------ associated items in this implementation
33 | /// Constructor
34 | pub fn new(
| ^^^
...
56 | pub fn get_key_for_receiver(&self, receiver: EncryptionKey) -> Option<&DecryptionKey> {
| ^^^^^^^^^^^^^^^^^^^^
Check failure on line 15 in funds-manager/src/indexer/mod.rs
github-actions / clippy
struct `Indexer` is never constructed
error: struct `Indexer` is never constructed
--> funds-manager/src/indexer/mod.rs:15:19
|
15 | pub(crate) struct Indexer {
| ^^^^^^^
Check failure on line 108 in funds-manager/src/main.rs
github-actions / clippy
method `build_indexer` is never used
error: method `build_indexer` is never used
--> funds-manager/src/main.rs:108:12
|
106 | impl Server {
| ----------- method in this implementation
107 | /// Build an indexer
108 | pub fn build_indexer(&self) -> Result<Indexer, FundsManagerError> {
| ^^^^^^^^^^^^^
Check failure on line 91 in funds-manager/src/main.rs
github-actions / clippy
multiple fields are never read
error: multiple fields are never read
--> funds-manager/src/main.rs:91:9
|
89 | struct Server {
| ------ fields in this struct
90 | /// The id of the chain this indexer targets
91 | pub chain_id: u64,
| ^^^^^^^^
92 | /// The chain this indexer targets
93 | pub chain: Chain,
| ^^^^^
94 | /// A client for interacting with the relayer
95 | pub relayer_client: RelayerClient,
| ^^^^^^^^^^^^^^
96 | /// The Arbitrum client
97 | pub arbitrum_client: ArbitrumClient,
| ^^^^^^^^^^^^^^^
98 | /// The decryption key
99 | pub decryption_keys: Vec<DecryptionKey>,
| ^^^^^^^^^^^^^^^
100 | /// The DB url
101 | pub db_url: String,
| ^^^^^^
102 | /// The AWS config
103 | pub aws_config: SdkConfig,
| ^^^^^^^^^^
|
= note: `Server` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
Check failure on line 154 in funds-manager/src/main.rs
github-actions / clippy
unused variable: `server`
error: unused variable: `server`
--> funds-manager/src/main.rs:154:9
|
154 | let server = Server {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
Check failure on line 33 in funds-manager/src/main.rs
github-actions / clippy
unused import: `reply::Json`
error: unused import: `reply::Json`
--> funds-manager/src/main.rs:33:12
|
33 | use warp::{reply::Json, Filter};
| ^^^^^^^^^^^
Check failure on line 26 in funds-manager/src/main.rs
github-actions / clippy
unused import: `sync::Arc`
error: unused import: `sync::Arc`
--> funds-manager/src/main.rs:26:39
|
26 | use std::{error::Error, str::FromStr, sync::Arc};
| ^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`