feat(storage): add draft for storage #92
clippy
13 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 13 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.0-nightly (8142a319e 2023-09-13)
- cargo 1.74.0-nightly (2fc85d15a 2023-09-09)
- clippy 0.1.74 (8142a31 2023-09-13)
Annotations
Check warning on line 12 in src/storage.rs
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() {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 4 in src/main.rs
github-actions / clippy
this import is redundant
warning: this import is redundant
--> src/main.rs:4:1
|
4 | use ark_core;
| ^^^^^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `#[warn(clippy::single_component_path_imports)]` on by default
Check warning on line 122 in crates/ark-core/src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/ark-core/src/lib.rs:122:9
|
122 | return to;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
122 - return to;
122 + to
|
Check warning on line 120 in crates/ark-core/src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/ark-core/src/lib.rs:117:9
|
117 | / return client
118 | | .block_number()
119 | | .await
120 | | .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`
|
117 ~ client
118 + .block_number()
119 + .await
120 ~ .expect("Can't fetch last block number")
|
Check warning on line 54 in crates/ark-core/src/managers/token_manager.rs
github-actions / clippy
useless conversion to the same type: `starknet::core::types::FieldElement`
warning: useless conversion to the same type: `starknet::core::types::FieldElement`
--> crates/ark-core/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 crates/ark-core/src/managers/token_manager.rs
github-actions / clippy
useless conversion to the same type: `starknet::core::types::FieldElement`
warning: useless conversion to the same type: `starknet::core::types::FieldElement`
--> crates/ark-core/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 crates/ark-core/src/managers/token_manager.rs
github-actions / clippy
using `clone` on type `u64` which implements the `Copy` trait
warning: using `clone` on type `u64` which implements the `Copy` trait
--> crates/ark-core/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 crates/ark-core/src/managers/event_manager.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/ark-core/src/managers/event_manager.rs:31:9
|
31 | 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`
|
31 - return Some(vec![vec![TRANSFER_SELECTOR]]);
31 + Some(vec![vec![TRANSFER_SELECTOR]])
|
Check warning on line 15 in crates/ark-core/src/managers/event_manager.rs
github-actions / clippy
field `client` is never read
warning: field `client` is never read
--> crates/ark-core/src/managers/event_manager.rs:15:5
|
13 | pub struct EventManager<'a, T: StorageManager, C: StarknetClient> {
| ------------ field in this struct
14 | storage: &'a T,
15 | client: &'a C,
| ^^^^^^
|
= note: `EventManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
Check warning on line 3 in crates/ark-core/src/managers/block_manager.rs
github-actions / clippy
unused import: `BlockInfo`
warning: unused import: `BlockInfo`
--> crates/ark-core/src/managers/block_manager.rs:3:47
|
3 | use ark_storage::types::{BlockIndexingStatus, BlockInfo};
| ^^^^^^^^^
Check warning on line 1 in crates/ark-core/src/managers/collection_manager.rs
github-actions / clippy
unused import: `anyhow`
warning: unused import: `anyhow`
--> crates/ark-core/src/managers/collection_manager.rs:1:14
|
1 | use anyhow::{anyhow, Result};
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 14 in crates/ark-starknet/src/client.rs
github-actions / clippy
methods called `new` usually return `Self`
warning: methods called `new` usually return `Self`
--> crates/ark-starknet/src/client.rs:14:5
|
14 | fn new(rpc_url: &str) -> Result<StarknetClientHttp>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
= note: `#[warn(clippy::new_ret_no_self)]` on by default
Check warning on line 40 in crates/ark-storage/src/storage_manager.rs
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:38:5
|
38 | / pub fn new() -> Self {
39 | | Self
40 | | }
| |_____^
|
= 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
|
37 + impl Default for DefaultStorage {
38 + fn default() -> Self {
39 + Self::new()
40 + }
41 + }
|