Skip to content

feat(core): update indexer status #189

feat(core): update indexer status

feat(core): update indexer status #189

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

2 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 2
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 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 21 in crates/ark-db/src/indexer/create.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::string::String`

warning: useless conversion to the same type: `std::string::String`
  --> crates/ark-db/src/indexer/create.rs:21:44
   |
21 |         .item("version", AttributeValue::S(String::from(indexer_version)))
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `indexer_version`
   |
   = 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