impl suggestions #239
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
1 error and 18 warnings
clippy_check
Process completed with exit code 101.
|
unneeded `return` statement:
src/main.rs#L124
warning: unneeded `return` statement
--> src/main.rs:124:9
|
124 | return to;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
124 - return to;
124 + to
|
|
unneeded `return` statement:
src/main.rs#L119
warning: unneeded `return` statement
--> src/main.rs:119:9
|
119 | / return client
120 | | .block_number()
121 | | .await
122 | | .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`
|
119 ~ client
120 + .block_number()
121 + .await
122 ~ .expect("Can't fetch last block number")
|
|
useless conversion to the same type: `starknet::core::types::FieldElement`:
src/managers/token_manager.rs#L54
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
|
useless conversion to the same type: `starknet::core::types::FieldElement`:
src/managers/token_manager.rs#L53
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
|
using `clone` on type `u64` which implements the `Copy` trait:
src/managers/token_manager.rs#L35
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
|
unneeded `return` statement:
src/managers/event_manager.rs#L33
warning: unneeded `return` statement
--> src/managers/event_manager.rs:33:9
|
33 | return Some(vec![vec![TRANSFER_SELECTOR]]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
33 - return Some(vec![vec![TRANSFER_SELECTOR]]);
33 + Some(vec![vec![TRANSFER_SELECTOR]])
|
|
function `init_aws` is never used:
src/storage.rs#L12
warning: function `init_aws` is never used
--> src/storage.rs:12:8
|
12 | pub fn init_aws() {
| ^^^^^^^^
|
variants `Processing` and `Terminated` are never constructed:
src/managers/block_manager.rs#L18
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
|
field `storage` is never read:
src/managers/block_manager.rs#L9
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
|
field `storage` is never read:
src/managers/token_manager.rs#L10
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
|
fields `storage` and `client` are never read:
src/managers/event_manager.rs#L14
warning: fields `storage` and `client` are never read
--> src/managers/event_manager.rs:14:5
|
13 | pub struct EventManager<'a, T: StorageManager> {
| ------------ fields in this struct
14 | storage: &'a T,
| ^^^^^^^
...
18 | client: &'a StarknetClient,
| ^^^^^^
|
= note: `EventManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
field `storage` is never read:
src/managers/collection_manager.rs#L38
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,
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
you should consider adding a `Default` implementation for `DefaultStorage`:
crates/ark-storage/src/storage_manager.rs#L18
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 + }
|
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@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/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|