fix: parse long strings #234
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
1 error and 65 warnings
clippy_check
Process completed with exit code 101.
|
unneeded `return` statement:
src/main.rs#L126
warning: unneeded `return` statement
--> src/main.rs:126:9
|
126 | return to;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
126 - return to;
126 + to
|
|
unneeded `return` statement:
src/main.rs#L121
warning: unneeded `return` statement
--> src/main.rs:121:9
|
121 | / return client
122 | | .block_number()
123 | | .await
124 | | .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`
|
121 ~ client
122 + .block_number()
123 + .await
124 ~ .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#L31
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")]])
|
|
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#L12
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
|
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
|
unused variable: `metadata_manager`:
src/main.rs#L29
warning: unused variable: `metadata_manager`
--> src/main.rs:29:9
|
29 | let metadata_manager = MetadataManager::new(&storage, &sn_client);
| ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_metadata_manager`
|
= note: `#[warn(unused_variables)]` on by default
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L85
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:85:52
|
85 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_high`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L85
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:85:30
|
85 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_low`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L71
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:71:44
|
71 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_high`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L71
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:71:22
|
71 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_low`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
unneeded `return` statement:
crates/ark-metadata/src/metadata_manager.rs#L94
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata_manager.rs:94:25
|
94 | return Err(anyhow!("Token URI not found"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
94 - return Err(anyhow!("Token URI not found"));
94 + Err(anyhow!("Token URI not found"))
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
crates/ark-metadata/src/cairo_strings.rs#L26
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> crates/ark-metadata/src/cairo_strings.rs:26:49
|
26 | let field_element = long_string[i as usize].clone();
| ^^^^^^^^^^ help: try: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/cairo_strings.rs#L26
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/cairo_strings.rs:26:37
|
26 | let field_element = long_string[i as usize].clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `long_string[i as usize]`
|
= 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:
crates/ark-metadata/src/cairo_strings.rs#L20
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:20:21
|
20 | None => return Err(anyhow!("No value found")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
20 | None => Err(anyhow!("No value found")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L16
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:16:25
|
16 | return Err(anyhow!("Error parsing short string"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
16 - return Err(anyhow!("Error parsing short string"));
16 + Err(anyhow!("Error parsing short string"))
|
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L13
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:13:25
|
13 | return Ok(value);
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
13 - return Ok(value);
13 + Ok(value)
|
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L7
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:7:13
|
7 | return Err(anyhow!("No value found"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
7 - return Err(anyhow!("No value found"));
7 + Err(anyhow!("No value found"))
|
|
field `storage` is never read:
crates/ark-metadata/src/metadata_manager.rs#L18
warning: field `storage` is never read
--> crates/ark-metadata/src/metadata_manager.rs:18:5
|
17 | pub struct MetadataManager<'a, T: StorageManager> {
| --------------- field in this struct
18 | storage: &'a T,
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `normalized_metadata`:
crates/ark-metadata/src/metadata_manager.rs#L118
warning: unused variable: `normalized_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:118:28
|
118 | let (raw_metadata, normalized_metadata) =
| ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_normalized_metadata`
|
unused variable: `raw_metadata`:
crates/ark-metadata/src/metadata_manager.rs#L118
warning: unused variable: `raw_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:118:14
|
118 | let (raw_metadata, normalized_metadata) =
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_raw_metadata`
|
unused variable: `block_number`:
crates/ark-metadata/src/metadata_manager.rs#L108
warning: unused variable: `block_number`
--> crates/ark-metadata/src/metadata_manager.rs:108:9
|
108 | block_number: BlockId,
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_number`
|
= note: `#[warn(unused_variables)]` 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 + }
|
|
unused import: `std::collections::HashMap`:
crates/ark-db/src/token/create.rs#L5
warning: unused import: `std::collections::HashMap`
--> crates/ark-db/src/token/create.rs:5:5
|
5 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
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/
|
unneeded `return` statement:
src/main.rs#L126
warning: unneeded `return` statement
--> src/main.rs:126:9
|
126 | return to;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
126 - return to;
126 + to
|
|
unneeded `return` statement:
src/main.rs#L121
warning: unneeded `return` statement
--> src/main.rs:121:9
|
121 | / return client
122 | | .block_number()
123 | | .await
124 | | .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`
|
121 ~ client
122 + .block_number()
123 + .await
124 ~ .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#L31
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")]])
|
|
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#L12
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
|
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
|
unused variable: `metadata_manager`:
src/main.rs#L29
warning: unused variable: `metadata_manager`
--> src/main.rs:29:9
|
29 | let metadata_manager = MetadataManager::new(&storage, &sn_client);
| ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_metadata_manager`
|
= note: `#[warn(unused_variables)]` on by default
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L85
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:85:52
|
85 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_high`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L85
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:85:30
|
85 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_low`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L71
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:71:44
|
71 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_high`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L71
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:71:22
|
71 | vec![token_id_low.clone(), token_id_high.clone()],
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `token_id_low`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
unneeded `return` statement:
crates/ark-metadata/src/metadata_manager.rs#L94
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata_manager.rs:94:25
|
94 | return Err(anyhow!("Token URI not found"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
94 - return Err(anyhow!("Token URI not found"));
94 + Err(anyhow!("Token URI not found"))
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
crates/ark-metadata/src/cairo_strings.rs#L26
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> crates/ark-metadata/src/cairo_strings.rs:26:49
|
26 | let field_element = long_string[i as usize].clone();
| ^^^^^^^^^^ help: try: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/cairo_strings.rs#L26
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/cairo_strings.rs:26:37
|
26 | let field_element = long_string[i as usize].clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `long_string[i as usize]`
|
= 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:
crates/ark-metadata/src/cairo_strings.rs#L20
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:20:21
|
20 | None => return Err(anyhow!("No value found")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
20 | None => Err(anyhow!("No value found")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L16
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:16:25
|
16 | return Err(anyhow!("Error parsing short string"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
16 - return Err(anyhow!("Error parsing short string"));
16 + Err(anyhow!("Error parsing short string"))
|
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L13
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:13:25
|
13 | return Ok(value);
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
13 - return Ok(value);
13 + Ok(value)
|
|
unneeded `return` statement:
crates/ark-metadata/src/cairo_strings.rs#L7
warning: unneeded `return` statement
--> crates/ark-metadata/src/cairo_strings.rs:7:13
|
7 | return Err(anyhow!("No value found"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
7 - return Err(anyhow!("No value found"));
7 + Err(anyhow!("No value found"))
|
|
field `storage` is never read:
crates/ark-metadata/src/metadata_manager.rs#L18
warning: field `storage` is never read
--> crates/ark-metadata/src/metadata_manager.rs:18:5
|
17 | pub struct MetadataManager<'a, T: StorageManager> {
| --------------- field in this struct
18 | storage: &'a T,
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `normalized_metadata`:
crates/ark-metadata/src/metadata_manager.rs#L118
warning: unused variable: `normalized_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:118:28
|
118 | let (raw_metadata, normalized_metadata) =
| ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_normalized_metadata`
|
unused variable: `raw_metadata`:
crates/ark-metadata/src/metadata_manager.rs#L118
warning: unused variable: `raw_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:118:14
|
118 | let (raw_metadata, normalized_metadata) =
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_raw_metadata`
|
unused variable: `block_number`:
crates/ark-metadata/src/metadata_manager.rs#L108
warning: unused variable: `block_number`
--> crates/ark-metadata/src/metadata_manager.rs:108:9
|
108 | block_number: BlockId,
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_number`
|
= note: `#[warn(unused_variables)]` 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 + }
|
|
unused import: `std::collections::HashMap`:
crates/ark-db/src/token/create.rs#L5
warning: unused import: `std::collections::HashMap`
--> crates/ark-db/src/token/create.rs:5:5
|
5 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|