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

clippy

15 warnings

Details

Results

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

Versions

  • rustc 1.74.0-nightly (d9c8274fb 2023-09-12)
  • cargo 1.74.0-nightly (2fc85d15a 2023-09-09)
  • clippy 0.1.74 (d9c8274 2023-09-12)

Annotations

Check warning on line 128 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/main.rs:128:9
    |
128 |         return to;
    |         ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
128 -         return to;
128 +         to
    |

Check warning on line 126 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/main.rs:123:9
    |
123 | /         return client
124 | |             .block_number()
125 | |             .await
126 | |             .expect("Can't fetch last block number");
    | |____________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
123 ~         client
124 +             .block_number()
125 +             .await
126 ~             .expect("Can't fetch last block number")
    |

Check warning on line 54 in src/managers/token_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `starknet::core::types::FieldElement`

warning: useless conversion to the same type: `starknet::core::types::FieldElement`
  --> src/managers/token_manager.rs:54:17
   |
54 |                 FieldElement::from(event.token_id.high),
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `FieldElement::from()`: `event.token_id.high`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 53 in src/managers/token_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `starknet::core::types::FieldElement`

warning: useless conversion to the same type: `starknet::core::types::FieldElement`
  --> src/managers/token_manager.rs:53:17
   |
53 |                 FieldElement::from(event.token_id.low),
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `FieldElement::from()`: `event.token_id.low`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
   = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 35 in src/managers/token_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

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

warning: using `clone` on type `u64` which implements the `Copy` trait
  --> src/managers/token_manager.rs:35:32
   |
35 |         self.token.timestamp = event.timestamp.clone();
   |                                ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `event.timestamp`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 31 in src/managers/event_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> src/managers/event_manager.rs:31:9
   |
31 |         return Some(vec![vec![selector!("Transfer")]]);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
31 -         return Some(vec![vec![selector!("Transfer")]]);
31 +         Some(vec![vec![selector!("Transfer")]])
   |

Check warning on line 38 in src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `get_ecs_task_id` is never used

warning: function `get_ecs_task_id` is never used
  --> src/utils.rs:38:8
   |
38 | pub fn get_ecs_task_id() -> String {
   |        ^^^^^^^^^^^^^^^

Check warning on line 12 in src/storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `init_aws` is never used

warning: function `init_aws` is never used
  --> src/storage.rs:12:8
   |
12 | pub fn init_aws() {
   |        ^^^^^^^^

Check warning on line 18 in src/managers/block_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variants `Processing` and `Terminated` are never constructed

warning: variants `Processing` and `Terminated` are never constructed
  --> src/managers/block_manager.rs:18:5
   |
16 | pub enum BlockIndexingStatus {
   |          ------------------- variants in this enum
17 |     None,
18 |     Processing,
   |     ^^^^^^^^^^
19 |     Terminated,
   |     ^^^^^^^^^^
   |
   = note: `BlockIndexingStatus` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check warning on line 9 in src/managers/block_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `storage` is never read

warning: field `storage` is never read
 --> src/managers/block_manager.rs:9:5
  |
8 | pub struct BlockManager<'a, T: StorageManager> {
  |            ------------ field in this struct
9 |     storage: &'a T,
  |     ^^^^^^^
  |
  = note: `BlockManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check warning on line 10 in src/managers/token_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `storage` is never read

warning: field `storage` is never read
  --> src/managers/token_manager.rs:10:5
   |
9  | pub struct TokenManager<'a, T: StorageManager> {
   |            ------------ field in this struct
10 |     storage: &'a T,
   |     ^^^^^^^
   |
   = note: `TokenManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check warning on line 12 in src/managers/event_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `storage` and `client` are never read

warning: fields `storage` and `client` are never read
  --> src/managers/event_manager.rs:12:5
   |
11 | pub struct EventManager<'a, T: StorageManager> {
   |            ------------ fields in this struct
12 |     storage: &'a T,
   |     ^^^^^^^
...
16 |     client: &'a StarknetClient,
   |     ^^^^^^
   |
   = note: `EventManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check warning on line 38 in src/managers/collection_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `storage` is never read

warning: field `storage` is never read
  --> src/managers/collection_manager.rs:38:5
   |
37 | pub struct CollectionManager<'a, T: StorageManager> {
   |            ----------------- field in this struct
38 |     storage: &'a T,
   |     ^^^^^^^

Check warning on line 1 in src/constants.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `BLACKLIST` is never used

warning: constant `BLACKLIST` is never used
 --> src/constants.rs:1:11
  |
1 | pub const BLACKLIST: [&str; 5] = [
  |           ^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

Check warning on line 20 in crates/ark-storage/src/storage_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `DefaultStorage`

warning: you should consider adding a `Default` implementation for `DefaultStorage`
  --> crates/ark-storage/src/storage_manager.rs:18:5
   |
18 | /     pub fn new() -> Self {
19 | |         Self
20 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
17 + impl Default for DefaultStorage {
18 +     fn default() -> Self {
19 +         Self::new()
20 +     }
21 + }
   |