Skip to content

fix(cors): update indexer #192

fix(cors): update indexer

fix(cors): update indexer #192

Triggered via push September 7, 2023 09:04
Status Failure
Total duration 4m 10s
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 14 warnings
clippy_check
Process completed with exit code 101.
this expression creates a reference which is immediately dereferenced by the compiler: src/utils.rs#L45
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/utils.rs:45:20 | 45 | .unwrap_or(&""); | ^^^ help: change this to: `""` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/core/block.rs#L159
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/core/block.rs:159:13 | 159 | &ecs_task_id, | ^^^^^^^^^^^^ help: change this to: `ecs_task_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/core/block.rs#L158
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/core/block.rs:158:13 | 158 | &dynamo_client, | ^^^^^^^^^^^^^^ help: change this to: `dynamo_client` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/core/block.rs#L88
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/core/block.rs:88:17 | 88 | &dynamo_client, | ^^^^^^^^^^^^^^ help: change this to: `dynamo_client` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this `else { if .. }` block can be collapsed: src/core/block.rs#L147
warning: this `else { if .. }` block can be collapsed --> src/core/block.rs:147:16 | 147 | } else { | ________________^ 148 | | if !is_continous { 149 | | break; 150 | | } else { 151 | | sleep(Duration::from_secs(5)).await; 152 | | } 153 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 147 ~ } else if !is_continous { 148 + break; 149 + } else { 150 + sleep(Duration::from_secs(5)).await; 151 + } |
using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`: crates/ark-starknet/src/collection_manager.rs#L55
warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` --> crates/ark-starknet/src/collection_manager.rs:55:23 | 55 | Err(_) => self | _______________________^ 56 | | .call_contract_helper( 57 | | contract_address, 58 | | "owner_of", ... | 63 | | .await 64 | | .or_else(|_| Err(anyhow!("Failed to get token owner"))), | |_______________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map = note: `#[warn(clippy::bind_instead_of_map)]` on by default help: try | 55 ~ Err(_) => self 56 + .call_contract_helper( 57 + contract_address, 58 + "owner_of", 59 + token_id_low, 60 + token_id_high, 61 + effective_block_id, 62 + ) 63 ~ .await.map_err(|_| anyhow!("Failed to get token owner")), |
called `unwrap` on `indexation_progress` after checking its variant with `is_some`: crates/ark-db/src/indexer/update.rs#L43
warning: called `unwrap` on `indexation_progress` after checking its variant with `is_some` --> crates/ark-db/src/indexer/update.rs:43:31 | 40 | if indexation_progress.is_some() { | -------------------------------- help: try: `if let Some(..) = indexation_progress` ... 43 | AttributeValue::N(indexation_progress.unwrap().to_string()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
called `unwrap` on `to` after checking its variant with `is_some`: crates/ark-db/src/indexer/update.rs#L37
warning: called `unwrap` on `to` after checking its variant with `is_some` --> crates/ark-db/src/indexer/update.rs:37:56 | 36 | if to.is_some() { | --------------- help: try: `if let Some(..) = to` 37 | request = request.item("to", AttributeValue::N(to.unwrap().to_string())); | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
called `unwrap` on `from` after checking its variant with `is_some`: crates/ark-db/src/indexer/update.rs#L33
warning: called `unwrap` on `from` after checking its variant with `is_some` --> crates/ark-db/src/indexer/update.rs:33:58 | 32 | if from.is_some() { | ----------------- help: try: `if let Some(..) = from` 33 | request = request.item("from", AttributeValue::N(from.unwrap().to_string())); | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap = note: `#[warn(clippy::unnecessary_unwrap)]` 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/