ci: add metadata worflow #260
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
1 error and 38 warnings
clippy_check
Process completed with exit code 101.
|
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() {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
this import is redundant:
src/main.rs#L4
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
|
unneeded `return` statement:
crates/ark-core/src/lib.rs#L122
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
|
|
unneeded `return` statement:
crates/ark-core/src/lib.rs#L117
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")
|
|
useless conversion to the same type: `starknet::core::types::FieldElement`:
crates/ark-core/src/managers/token_manager.rs#L54
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
|
useless conversion to the same type: `starknet::core::types::FieldElement`:
crates/ark-core/src/managers/token_manager.rs#L53
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
|
using `clone` on type `u64` which implements the `Copy` trait:
crates/ark-core/src/managers/token_manager.rs#L35
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
|
unneeded `return` statement:
crates/ark-core/src/managers/event_manager.rs#L31
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]])
|
|
field `client` is never read:
crates/ark-core/src/managers/event_manager.rs#L15
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
|
unused import: `BlockInfo`:
crates/ark-core/src/managers/block_manager.rs#L3
warning: unused import: `BlockInfo`
--> crates/ark-core/src/managers/block_manager.rs:3:47
|
3 | use ark_storage::types::{BlockIndexingStatus, BlockInfo};
| ^^^^^^^^^
|
unused import: `anyhow`:
crates/ark-core/src/managers/collection_manager.rs#L1
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
crates/ark-metadata/src/metadata/cairo_string_parser.rs#L35
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:35:52
|
35 | let field_element = field_elements[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/metadata/cairo_string_parser.rs#L35
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:35:37
|
35 | let field_element = field_elements[i as usize].clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `field_elements[i as usize]`
|
= 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/cairo_string_parser.rs#L28
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:28:21
|
28 | 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`
|
28 | None => Err(anyhow!("No value found")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/ark-metadata/src/metadata/cairo_string_parser.rs#L24
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:24:25
|
24 | 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`
|
24 - return Err(anyhow!("Error parsing short string"));
24 + Err(anyhow!("Error parsing short string"))
|
|
unneeded `return` statement:
crates/ark-metadata/src/metadata/cairo_string_parser.rs#L21
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:21:25
|
21 | return Ok(value);
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
21 - return Ok(value);
21 + Ok(value)
|
|
unneeded `return` statement:
crates/ark-metadata/src/metadata/cairo_string_parser.rs#L14
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/cairo_string_parser.rs:14:13
|
14 | 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`
|
14 - return Err(anyhow!("No value found"));
14 + Err(anyhow!("No value found"))
|
|
unneeded `return` statement:
crates/ark-metadata/src/metadata/normalization.rs#L149
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/normalization.rs:149:13
|
149 | return Ok(normalized_metadata);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
149 - return Ok(normalized_metadata);
149 + Ok(normalized_metadata)
|
|
useless conversion to the same type: `std::string::String`:
crates/ark-metadata/src/metadata/normalization.rs#L109
warning: useless conversion to the same type: `std::string::String`
--> crates/ark-metadata/src/metadata/normalization.rs:109:45
|
109 | ... trait_type: String::from(trait_type),
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `trait_type`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::string::String`:
crates/ark-metadata/src/metadata/normalization.rs#L102
warning: useless conversion to the same type: `std::string::String`
--> crates/ark-metadata/src/metadata/normalization.rs:102:49
|
102 | ... trait_type: String::from(trait_type),
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `trait_type`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::string::String`:
crates/ark-metadata/src/metadata/normalization.rs#L97
warning: useless conversion to the same type: `std::string::String`
--> crates/ark-metadata/src/metadata/normalization.rs:97:49
|
97 | ... trait_type: String::from(trait_type),
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `trait_type`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::string::String`:
crates/ark-metadata/src/metadata/normalization.rs#L90
warning: useless conversion to the same type: `std::string::String`
--> crates/ark-metadata/src/metadata/normalization.rs:90:45
|
90 | ... trait_type: String::from(trait_type),
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `trait_type`
|
= 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
|
unneeded `return` statement:
crates/ark-metadata/src/metadata/normalization.rs#L60
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata/normalization.rs:60:5
|
60 | / return BaseMetadataProperties {
61 | | description,
62 | | image,
63 | | name,
64 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
60 ~ BaseMetadataProperties {
61 + description,
62 + image,
63 + name,
64 ~ }
|
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
crates/ark-metadata/src/metadata_manager.rs#L82
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:82:52
|
82 | 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#L82
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:82:30
|
82 | 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#L68
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:68:44
|
68 | 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#L68
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> crates/ark-metadata/src/metadata_manager.rs:68:22
|
68 | 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
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
unneeded `return` statement:
crates/ark-metadata/src/metadata_manager.rs#L91
warning: unneeded `return` statement
--> crates/ark-metadata/src/metadata_manager.rs:91:25
|
91 | return Err(anyhow!("Token URI not 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`
|
91 - return Err(anyhow!("Token URI not found"));
91 + Err(anyhow!("Token URI not found"))
|
|
field `storage` is never read:
crates/ark-metadata/src/metadata_manager.rs#L16
warning: field `storage` is never read
--> crates/ark-metadata/src/metadata_manager.rs:16:5
|
15 | pub struct MetadataManager<'a, T: StorageManager, C: StarknetClient> {
| --------------- field in this struct
16 | storage: &'a T,
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `normalized_metadata`:
crates/ark-metadata/src/metadata_manager.rs#L45
warning: unused variable: `normalized_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:45:28
|
45 | 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#L45
warning: unused variable: `raw_metadata`
--> crates/ark-metadata/src/metadata_manager.rs:45:14
|
45 | let (raw_metadata, normalized_metadata) =
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_raw_metadata`
|
unused variable: `block_id`:
crates/ark-metadata/src/metadata_manager.rs#L35
warning: unused variable: `block_id`
--> crates/ark-metadata/src/metadata_manager.rs:35:9
|
35 | block_id: BlockId,
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_id`
|
= note: `#[warn(unused_variables)]` on by default
|
you should consider adding a `Default` implementation for `DefaultStorage`:
crates/ark-storage/src/storage_manager.rs#L38
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 + }
|
|
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/
|