Skip to content

add todo for storage #228

add todo for storage

add todo for storage #228

Triggered via push September 13, 2023 00:43
Status Failure
Total duration 3m 14s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

clippy-check.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error and 21 warnings
clippy_check
Process completed with exit code 101.
unneeded `return` statement: src/main.rs#L116
warning: unneeded `return` statement --> src/main.rs:116:9 | 116 | return current; | ^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 116 - return current; 116 + current |
using `clone` on type `u64` which implements the `Copy` trait: src/managers/token_manager.rs#L29
warning: using `clone` on type `u64` which implements the `Copy` trait --> src/managers/token_manager.rs:29:32 | 29 | 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#L28
warning: unneeded `return` statement --> src/managers/event_manager.rs:28:9 | 28 | 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` | 28 - return Some(vec![vec![selector!("Transfer")]]); 28 + Some(vec![vec![selector!("Transfer")]]) |
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() { | ^^^^^^^^
function `get_ecs_task_id` is never used: src/utils.rs#L38
warning: function `get_ecs_task_id` is never used --> src/utils.rs:38:8 | 38 | pub fn get_ecs_task_id() -> String { | ^^^^^^^^^^^^^^^
function `process_transfer` is never used: src/transfer.rs#L8
warning: function `process_transfer` is never used --> src/transfer.rs:8:14 | 8 | pub async fn process_transfer<'a, T: StorageManager>( | ^^^^^^^^^^^^^^^^
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
associated items `new`, `format_token_from_event`, `create_token`, and `reset_token` are never used: src/managers/token_manager.rs#L13
warning: associated items `new`, `format_token_from_event`, `create_token`, and `reset_token` are never used --> src/managers/token_manager.rs:13:12 | 12 | impl<'a, T: StorageManager> TokenManager<'a, T> { | ----------------------------------------------- associated items in this implementation 13 | pub fn new( | ^^^ ... 24 | pub fn format_token_from_event(&mut self, event: &TokenEvent) { | ^^^^^^^^^^^^^^^^^^^^^^^ ... 44 | pub fn create_token(&self) -> Result<()> { | ^^^^^^^^^^^^ ... 49 | pub fn reset_token(&mut self) { | ^^^^^^^^^^^
fields `storage` and `token` are never read: src/managers/token_manager.rs#L7
warning: fields `storage` and `token` are never read --> src/managers/token_manager.rs:7:5 | 6 | pub struct TokenManager<'a, T: StorageManager> { | ------------ fields in this struct 7 | storage: &'a T, | ^^^^^^^ 8 | token: TokenFromEvent, | ^^^^^ | = note: `TokenManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
methods `reset_event`, `format_event`, `get_event`, `get_event_type`, and `create_event` are never used: src/managers/event_manager.rs#L31
warning: methods `reset_event`, `format_event`, `get_event`, `get_event_type`, and `create_event` are never used --> src/managers/event_manager.rs:31:12 | 16 | impl<'a, T: StorageManager> EventManager<'a, T> { | ----------------------------------------------- methods in this implementation ... 31 | pub fn reset_event(&mut self) { | ^^^^^^^^^^^ ... 35 | pub fn format_event( | ^^^^^^^^^^^^ ... 63 | pub fn get_event(&self) -> &TokenEvent { | ^^^^^^^^^ ... 67 | pub fn get_event_type(&mut self) -> EventType { | ^^^^^^^^^^^^^^ ... 80 | pub fn create_event(&self) -> Result<()> { | ^^^^^^^^^^^^
fields `storage`, `token_event`, and `client` are never read: src/managers/event_manager.rs#L11
warning: fields `storage`, `token_event`, and `client` are never read --> src/managers/event_manager.rs:11:5 | 10 | pub struct EventManager<'a, T: StorageManager> { | ------------ fields in this struct 11 | storage: &'a T, | ^^^^^^^ 12 | token_event: TokenEvent, | ^^^^^^^^^^^ 13 | client: &'a StarknetClient, | ^^^^^^ | = note: `EventManager` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
methods `get_token_owner` and `call_contract_helper` are never used: src/managers/collection_manager.rs#L90
warning: methods `get_token_owner` and `call_contract_helper` are never used --> src/managers/collection_manager.rs:90:18 | 44 | impl<'a, T: StorageManager> CollectionManager<'a, T> { | ---------------------------------------------------- methods in this implementation ... 90 | pub async fn get_token_owner( | ^^^^^^^^^^^^^^^ ... 122 | async fn call_contract_helper( | ^^^^^^^^^^^^^^^^^^^^
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, | ^^^^^^^
constant `BLACKLIST` is never used: src/constants.rs#L1
warning: constant `BLACKLIST` is never used --> src/constants.rs:1:11 | 1 | pub const BLACKLIST: [&str; 5] = [ | ^^^^^^^^^ | = 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/