feat: update karathuru on sepolia #82
Annotations
72 warnings
stable / fmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L263
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:263:5
|
263 | return format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
263 - return format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0));
263 + format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0))
|
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L250
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:250:5
|
250 | return format!("{}m²", value.to_big_decimal(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
250 - return format!("{}m²", value.to_big_decimal(0));
250 + format!("{}m²", value.to_big_decimal(0))
|
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L207
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:207:5
|
207 | / return (
208 | | get_asset_area(value, &project_area, &total_value),
209 | | get_asset_carbon_unit(value, &project_carbon_unit, &total_value),
210 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
207 ~ (
208 + get_asset_area(value, &project_area, &total_value),
209 + get_asset_carbon_unit(value, &project_carbon_unit, &total_value),
210 ~ )
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/api/src/portfolio/get_by_wallet.rs#L155
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:155:52
|
155 | Some(uri) => aggregate_image_from_slot_uri(&uri.as_str()).await,
| ^^^^^^^^^^^^^ help: change this to: `uri.as_str()`
|
= 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:
packages/api/src/portfolio/get_by_wallet.rs#L124
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:124:9
|
124 | &customer_tokens.as_slice(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `customer_tokens.as_slice()`
|
= 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:
packages/api/src/portfolio/get_by_wallet.rs#L93
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:93:52
|
93 | Some(uri) => aggregate_image_from_slot_uri(&uri.as_str()).await,
| ^^^^^^^^^^^^^ help: change this to: `uri.as_str()`
|
= 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
|
unneeded `return` statement:
packages/api/src/launchpad/details.rs#L153
warning: unneeded `return` statement
--> packages/api/src/launchpad/details.rs:153:5
|
153 | return Ok(HttpResponse::NotFound().into());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
153 - return Ok(HttpResponse::NotFound().into());
153 + Ok(HttpResponse::NotFound().into())
|
|
using `clone` on type `Ulid` which implements the `Copy` trait:
packages/indexer/src/main.rs#L269
warning: using `clone` on type `Ulid` which implements the `Copy` trait
--> packages/indexer/src/main.rs:269:20
|
269 | key = Some(batch.last().unwrap().id.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `batch.last().unwrap().id`
|
= 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
|
length comparison to zero:
packages/indexer/src/main.rs#L250
warning: length comparison to zero
--> packages/indexer/src/main.rs:250:12
|
250 | if 0 == batch.len() {
| ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `batch.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
the borrowed expression implements the required traits:
packages/indexer/src/main.rs#L175
warning: the borrowed expression implements the required traits
--> packages/indexer/src/main.rs:175:50
|
175 | let stream_config = configure_stream_filters(&file_path, &mut filters, &last_block_id)?;
| ^^^^^^^^^^ help: change this to: `file_path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L263
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:263:5
|
263 | return format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
263 - return format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0));
263 + format!("{}t", (value / U256::from(1000000u64)).to_big_decimal(0))
|
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L250
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:250:5
|
250 | return format!("{}m²", value.to_big_decimal(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
250 - return format!("{}m²", value.to_big_decimal(0));
250 + format!("{}m²", value.to_big_decimal(0))
|
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/infrastructure/view_model/farming.rs#L523
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/infrastructure/view_model/farming.rs:523:74
|
523 | offseter_deposited: SlotValue::from_blockchain(U256::zero(), value_decimals.clone()),
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `value_decimals`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
unneeded `return` statement:
packages/api/src/portfolio/get_by_wallet.rs#L207
warning: unneeded `return` statement
--> packages/api/src/portfolio/get_by_wallet.rs:207:5
|
207 | / return (
208 | | get_asset_area(value, &project_area, &total_value),
209 | | get_asset_carbon_unit(value, &project_carbon_unit, &total_value),
210 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
207 ~ (
208 + get_asset_area(value, &project_area, &total_value),
209 + get_asset_carbon_unit(value, &project_carbon_unit, &total_value),
210 ~ )
|
|
this creates an owned instance just for comparison:
packages/domain/src/infrastructure/starknet/uri.rs#L83
warning: this creates an owned instance just for comparison
--> packages/domain/src/infrastructure/starknet/uri.rs:83:19
|
83 | if url == "https://www.example.com/".to_owned() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*"https://www.example.com/"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: `#[warn(clippy::cmp_owned)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/api/src/portfolio/get_by_wallet.rs#L155
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:155:52
|
155 | Some(uri) => aggregate_image_from_slot_uri(&uri.as_str()).await,
| ^^^^^^^^^^^^^ help: change this to: `uri.as_str()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary map of the identity function:
packages/domain/src/infrastructure/starknet/project.rs#L187
warning: unnecessary map of the identity function
--> packages/domain/src/infrastructure/starknet/project.rs:187:62
|
187 | slot_data.extend(generic_data.clone().into_iter().map(|(k, v)| (k, v)));
| ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity
= note: `#[warn(clippy::map_identity)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/api/src/portfolio/get_by_wallet.rs#L124
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:124:9
|
124 | &customer_tokens.as_slice(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `customer_tokens.as_slice()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
length comparison to zero:
packages/domain/src/infrastructure/starknet/event_source.rs#L55
warning: length comparison to zero
--> packages/domain/src/infrastructure/starknet/event_source.rs:55:12
|
55 | if 0 == event.data.len() {
| ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `event.data.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/api/src/portfolio/get_by_wallet.rs#L93
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/api/src/portfolio/get_by_wallet.rs:93:52
|
93 | Some(uri) => aggregate_image_from_slot_uri(&uri.as_str()).await,
| ^^^^^^^^^^^^^ help: change this to: `uri.as_str()`
|
= 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
|
unneeded `return` statement:
packages/api/src/launchpad/details.rs#L153
warning: unneeded `return` statement
--> packages/api/src/launchpad/details.rs:153:5
|
153 | return Ok(HttpResponse::NotFound().into());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
153 - return Ok(HttpResponse::NotFound().into());
153 + Ok(HttpResponse::NotFound().into())
|
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
packages/domain/src/infrastructure/seed/migrator.rs#L44
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> packages/domain/src/infrastructure/seed/migrator.rs:44:33
|
44 | let slot = felt_to_u256(data[2][0].clone());
| ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `data[2][0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Ulid` which implements the `Copy` trait:
packages/indexer/src/main.rs#L269
warning: using `clone` on type `Ulid` which implements the `Copy` trait
--> packages/indexer/src/main.rs:269:20
|
269 | key = Some(batch.last().unwrap().id.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `batch.last().unwrap().id`
|
= 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
|
this function has too many arguments (9/7):
packages/domain/src/infrastructure/postgres/event_source.rs#L543
warning: this function has too many arguments (9/7)
--> packages/domain/src/infrastructure/postgres/event_source.rs:543:1
|
543 | / pub async fn append_customer_action<'a>(
544 | | tx: &Transaction<'a>,
545 | | event_id: &str,
546 | | event_timestamp: OffsetDateTime,
... |
552 | | action_type: ActionType,
553 | | ) -> Result<(), PostgresError> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
length comparison to zero:
packages/indexer/src/main.rs#L250
warning: length comparison to zero
--> packages/indexer/src/main.rs:250:12
|
250 | if 0 == batch.len() {
| ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `batch.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
this function has too many arguments (8/7):
packages/domain/src/infrastructure/postgres/event_source.rs#L200
warning: this function has too many arguments (8/7)
--> packages/domain/src/infrastructure/postgres/event_source.rs:200:1
|
200 | / pub async fn migrate_customer_token<'a>(
201 | | tx: &Transaction<'a>,
202 | | project_address: &str,
203 | | from_project_address: &str,
... |
208 | | value: &U256,
209 | | ) -> Result<(), PostgresError> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
the borrowed expression implements the required traits:
packages/indexer/src/main.rs#L175
warning: the borrowed expression implements the required traits
--> packages/indexer/src/main.rs:175:50
|
175 | let stream_config = configure_stream_filters(&file_path, &mut filters, &last_block_id)?;
| ^^^^^^^^^^ help: change this to: `file_path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
you should consider adding a `Default` implementation for `Ulid`:
packages/domain/src/domain/mod.rs#L27
warning: you should consider adding a `Default` implementation for `Ulid`
--> packages/domain/src/domain/mod.rs:27:5
|
27 | / pub fn new() -> Self {
28 | | Self(ulid::Ulid::new())
29 | | }
| |_____^
|
= 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
|
26 + impl Default for Ulid {
27 + fn default() -> Self {
28 + Self::new()
29 + }
30 + }
|
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/infrastructure/view_model/farming.rs#L523
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/infrastructure/view_model/farming.rs:523:74
|
523 | offseter_deposited: SlotValue::from_blockchain(U256::zero(), value_decimals.clone()),
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `value_decimals`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
assigning the result of `ToOwned::to_owned()` may be inefficient:
packages/domain/src/infrastructure/starknet/uri.rs#L84
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> packages/domain/src/infrastructure/starknet/uri.rs:84:13
|
84 | url = "https://dev-carbonable-metadata.fly.dev/collection/8".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"https://dev-carbonable-metadata.fly.dev/collection/8".clone_into(&mut url)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
|
use of a fallible conversion when an infallible one could be used:
packages/domain/src/domain/event_source/mod.rs#L76
warning: use of a fallible conversion when an infallible one could be used
--> packages/domain/src/domain/event_source/mod.rs:76:18
|
76 | .try_into()
| __________________^
77 | | .expect("failed to convert block_number to u64"),
| |________________________________________________________________^ help: use: `into()`
|
= note: converting `U256` to `u64` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
|
this creates an owned instance just for comparison:
packages/domain/src/infrastructure/starknet/uri.rs#L83
warning: this creates an owned instance just for comparison
--> packages/domain/src/infrastructure/starknet/uri.rs:83:19
|
83 | if url == "https://www.example.com/".to_owned() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*"https://www.example.com/"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: `#[warn(clippy::cmp_owned)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L415
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:415:13
|
415 | &customer_address,
| ^^^^^^^^^^^^^^^^^ help: change this to: `customer_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary map of the identity function:
packages/domain/src/infrastructure/starknet/project.rs#L187
warning: unnecessary map of the identity function
--> packages/domain/src/infrastructure/starknet/project.rs:187:62
|
187 | slot_data.extend(generic_data.clone().into_iter().map(|(k, v)| (k, v)));
| ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity
= note: `#[warn(clippy::map_identity)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L402
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:402:56
|
402 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
length comparison to zero:
packages/domain/src/infrastructure/starknet/event_source.rs#L55
warning: length comparison to zero
--> packages/domain/src/infrastructure/starknet/event_source.rs:55:12
|
55 | if 0 == event.data.len() {
| ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `event.data.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L182
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:182:56
|
182 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `FieldElement` which implements the `Copy` trait:
packages/domain/src/infrastructure/seed/migrator.rs#L44
warning: using `clone` on type `FieldElement` which implements the `Copy` trait
--> packages/domain/src/infrastructure/seed/migrator.rs:44:33
|
44 | let slot = felt_to_u256(data[2][0].clone());
| ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `data[2][0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
this function has too many arguments (9/7):
packages/domain/src/infrastructure/postgres/event_source.rs#L543
warning: this function has too many arguments (9/7)
--> packages/domain/src/infrastructure/postgres/event_source.rs:543:1
|
543 | / pub async fn append_customer_action<'a>(
544 | | tx: &Transaction<'a>,
545 | | event_id: &str,
546 | | event_timestamp: OffsetDateTime,
... |
552 | | action_type: ActionType,
553 | | ) -> Result<(), PostgresError> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L130
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:130:56
|
130 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this function has too many arguments (8/7):
packages/domain/src/infrastructure/postgres/event_source.rs#L200
warning: this function has too many arguments (8/7)
--> packages/domain/src/infrastructure/postgres/event_source.rs:200:1
|
200 | / pub async fn migrate_customer_token<'a>(
201 | | tx: &Transaction<'a>,
202 | | project_address: &str,
203 | | from_project_address: &str,
... |
208 | | value: &U256,
209 | | ) -> Result<(), PostgresError> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
sub-expression diverges:
/rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/macros/mod.rs#L873
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:54:9
|
54 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you should consider adding a `Default` implementation for `Ulid`:
packages/domain/src/domain/mod.rs#L27
warning: you should consider adding a `Default` implementation for `Ulid`
--> packages/domain/src/domain/mod.rs:27:5
|
27 | / pub fn new() -> Self {
28 | | Self(ulid::Ulid::new())
29 | | }
| |_____^
|
= 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
|
26 + impl Default for Ulid {
27 + fn default() -> Self {
28 + Self::new()
29 + }
30 + }
|
|
sub-expression diverges:
/rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/macros/mod.rs#L873
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:46:9
|
46 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
use of a fallible conversion when an infallible one could be used:
packages/domain/src/domain/event_source/mod.rs#L76
warning: use of a fallible conversion when an infallible one could be used
--> packages/domain/src/domain/event_source/mod.rs:76:18
|
76 | .try_into()
| __________________^
77 | | .expect("failed to convert block_number to u64"),
| |________________________________________________________________^
|
= note: converting `U256` to `u64` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
help: use
|
76 - .try_into()
76 + .into(),
|
|
sub-expression diverges:
/rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/macros/mod.rs#L873
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:42:9
|
42 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: `#[warn(clippy::diverging_sub_expression)]` on by default
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L415
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:415:13
|
415 | &customer_address,
| ^^^^^^^^^^^^^^^^^ help: change this to: `customer_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/domain/event_source/project.rs#L209
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/domain/event_source/project.rs:209:71
|
209 | match decrease_token_value(txn, from_address, &from_token_id, value.clone()).await {
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L402
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:402:56
|
402 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/domain/event_source/project.rs#L201
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/domain/event_source/project.rs:201:67
|
201 | match update_token_value(txn, from_address, &to_token_id, value.clone()).await {
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= 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
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L182
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:182:56
|
182 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
use of `or_insert` to construct default value:
packages/domain/src/domain/event_source/project.rs#L166
warning: use of `or_insert` to construct default value
--> packages/domain/src/domain/event_source/project.rs:166:14
|
166 | .or_insert(vec![])
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/yielder.rs#L130
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/yielder.rs:130:56
|
130 | find_related_project_address_and_slot(txn, &from_address, FarmType::Yield).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
sub-expression diverges:
/rustc/205af5d6beedc895b7f1fa2cdcae634bc2754cce/library/core/src/macros/mod.rs#L899
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:54:9
|
54 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/offseter.rs#L246
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:246:56
|
246 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
sub-expression diverges:
/rustc/205af5d6beedc895b7f1fa2cdcae634bc2754cce/library/core/src/macros/mod.rs#L899
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:46:9
|
46 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/offseter.rs#L194
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:194:56
|
194 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
sub-expression diverges:
/rustc/205af5d6beedc895b7f1fa2cdcae634bc2754cce/library/core/src/macros/mod.rs#L899
warning: sub-expression diverges
--> packages/domain/src/domain/event_source/transaction.rs:42:9
|
42 | todo!()
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: `#[warn(clippy::diverging_sub_expression)]` on by default
= note: this warning originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/offseter.rs#L142
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:142:56
|
142 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= 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
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/domain/event_source/project.rs#L209
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/domain/event_source/project.rs:209:71
|
209 | match decrease_token_value(txn, from_address, &from_token_id, value.clone()).await {
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
`to_string` applied to a type that implements `Display` in `write!` args:
packages/domain/src/domain/crypto.rs#L28
warning: `to_string` applied to a type that implements `Display` in `write!` args
--> packages/domain/src/domain/crypto.rs:28:31
|
28 | write!(f, "{}", self.0.to_string())
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
|
using `clone` on type `U256` which implements the `Copy` trait:
packages/domain/src/domain/event_source/project.rs#L201
warning: using `clone` on type `U256` which implements the `Copy` trait
--> packages/domain/src/domain/event_source/project.rs:201:67
|
201 | match update_token_value(txn, from_address, &to_token_id, value.clone()).await {
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= 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
|
use of `or_insert` to construct default value:
packages/domain/src/domain/event_source/project.rs#L166
warning: use of `or_insert` to construct default value
--> packages/domain/src/domain/event_source/project.rs:166:14
|
166 | .or_insert(vec![])
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
packages/domain/src/domain/event_source/offseter.rs#L246
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:246:56
|
246 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= 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:
packages/domain/src/domain/event_source/offseter.rs#L194
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:194:56
|
194 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= 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:
packages/domain/src/domain/event_source/offseter.rs#L142
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> packages/domain/src/domain/event_source/offseter.rs:142:56
|
142 | find_related_project_address_and_slot(txn, &from_address, FarmType::Offset).await?;
| ^^^^^^^^^^^^^ help: change this to: `from_address`
|
= 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
|
`to_string` applied to a type that implements `Display` in `write!` args:
packages/domain/src/domain/crypto.rs#L28
warning: `to_string` applied to a type that implements `Display` in `write!` args
--> packages/domain/src/domain/crypto.rs:28:31
|
28 | write!(f, "{}", self.0.to_string())
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
|
beta / clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
beta / clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|
stable / clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
stable / clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|