Skip to content
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy succeeded Sep 7, 2023 in 0s

clippy

9 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 9
Note 0
Help 0

Versions

  • rustc 1.74.0-nightly (e3abbd499 2023-09-06)
  • cargo 1.74.0-nightly (d14c85f4e 2023-09-05)
  • clippy 0.1.74 (e3abbd4 2023-09-06)

Annotations

Check warning on line 45 in src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 159 in src/core/block.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 158 in src/core/block.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 88 in src/core/block.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 153 in src/core/block.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

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 +         }
    |

Check warning on line 64 in crates/ark-starknet/src/collection_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`

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")),
   |

Check warning on line 46 in crates/ark-db/src/indexer/update.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `unwrap` on `indexation_progress` after checking its variant with `is_some`

warning: called `unwrap` on `indexation_progress` after checking its variant with `is_some`
  --> crates/ark-db/src/indexer/update.rs:46:31
   |
43 |     if indexation_progress.is_some() {
   |     -------------------------------- help: try: `if let Some(..) = indexation_progress`
...
46 |             AttributeValue::N(indexation_progress.unwrap().to_string()),
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap

Check warning on line 40 in crates/ark-db/src/indexer/update.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `unwrap` on `to` after checking its variant with `is_some`

warning: called `unwrap` on `to` after checking its variant with `is_some`
  --> crates/ark-db/src/indexer/update.rs:40:56
   |
39 |     if to.is_some() {
   |     --------------- help: try: `if let Some(..) = to`
40 |         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

Check warning on line 36 in crates/ark-db/src/indexer/update.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `unwrap` on `from` after checking its variant with `is_some`

warning: called `unwrap` on `from` after checking its variant with `is_some`
  --> crates/ark-db/src/indexer/update.rs:36:58
   |
35 |     if from.is_some() {
   |     ----------------- help: try: `if let Some(..) = from`
36 |         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