feat: add get_seed() for stronghold #9514
Clippy Results for the Rust Core
165 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 165 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0-beta.5 (0857a8e32 2024-12-27)
- cargo 1.84.0-beta.5 (66221abde 2024-11-19)
- clippy 0.1.84 (0857a8e32c 2024-12-27)
Annotations
Check failure on line 282 in sdk/src/wallet/account/update.rs
github-actions / Clippy Results for the Rust Core
this argument is a mutable reference, but not used mutably
error: this argument is a mutable reference, but not used mutably
--> sdk/src/wallet/account/update.rs:282:51
|
282 | pub(crate) async fn update_account_bech32_hrp(&mut self) -> crate::wallet::Result<()> {
| ^^^^^^^^^ help: consider changing to: `&self`
|
= note: this is cfg-gated and may require further changes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
Check failure on line 61 in sdk/src/wallet/account/builder.rs
github-actions / Clippy Results for the Rust Core
this argument is a mutable reference, but not used mutably
error: this argument is a mutable reference, but not used mutably
--> sdk/src/wallet/account/builder.rs:61:25
|
61 | pub async fn finish(&mut self) -> crate::wallet::Result<Account<S>> {
| ^^^^^^^^^ help: consider changing to: `&self`
|
= note: this is cfg-gated and may require further changes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
= note: `#[deny(clippy::needless_pass_by_ref_mut)]` implied by `#[deny(clippy::nursery)]`
Check failure on line 337 in sdk/src/wallet/migration/chrysalis.rs
github-actions / Clippy Results for the Rust Core
unnecessary use of `to_vec`
error: unnecessary use of `to_vec`
--> sdk/src/wallet/migration/chrysalis.rs:337:41
|
337 | if !chrysalis_data.contains_key(&b"iota-wallet-account-indexation".to_vec()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `b"iota-wallet-account-indexation".as_slice()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
= note: `#[deny(clippy::unnecessary_to_owned)]` implied by `#[deny(warnings)]`
Check failure on line 378 in sdk/src/wallet/core/operations/stronghold_backup/mod.rs
github-actions / Clippy Results for the Rust Core
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> sdk/src/wallet/core/operations/stronghold_backup/mod.rs:372:21
|
372 | / &self
373 | | .storage_options
374 | | .path
375 | | .clone()
376 | | .into_os_string()
377 | | .into_string()
378 | | .expect("can't convert os string"),
| |__________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
|
372 ~ self
373 + .storage_options
374 + .path
375 + .clone()
376 + .into_os_string()
377 + .into_string()
378 ~ .expect("can't convert os string"),
|
Check failure on line 305 in sdk/src/wallet/core/operations/stronghold_backup/mod.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/core/operations/stronghold_backup/mod.rs:297:36
|
297 | let ignore_backup_values = ignore_if_coin_type_mismatch.map_or(false, |ignore| {
| ____________________________________^
298 | | if ignore {
299 | | read_coin_type.map_or(true, |read_coin_type| {
300 | | self.coin_type.load(Ordering::Relaxed) != read_coin_type
... |
304 | | }
305 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
297 ~ let ignore_backup_values = ignore_if_coin_type_mismatch.is_some_and(|ignore| {
298 + if ignore {
299 + read_coin_type.map_or(true, |read_coin_type| {
300 + self.coin_type.load(Ordering::Relaxed) != read_coin_type
301 + })
302 + } else {
303 + false
304 + }
305 ~ });
|
Check failure on line 205 in sdk/src/wallet/core/operations/stronghold_backup/mod.rs
github-actions / Clippy Results for the Rust Core
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> sdk/src/wallet/core/operations/stronghold_backup/mod.rs:199:21
|
199 | / &self
200 | | .storage_options
201 | | .path
202 | | .clone()
203 | | .into_os_string()
204 | | .into_string()
205 | | .expect("can't convert os string"),
| |__________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
|
199 ~ self
200 + .storage_options
201 + .path
202 + .clone()
203 + .into_os_string()
204 + .into_string()
205 ~ .expect("can't convert os string"),
|
Check failure on line 123 in sdk/src/wallet/core/operations/stronghold_backup/mod.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/core/operations/stronghold_backup/mod.rs:115:36
|
115 | let ignore_backup_values = ignore_if_coin_type_mismatch.map_or(false, |ignore| {
| ____________________________________^
116 | | if ignore {
117 | | read_coin_type.map_or(true, |read_coin_type| {
118 | | self.coin_type.load(Ordering::Relaxed) != read_coin_type
... |
122 | | }
123 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
115 ~ let ignore_backup_values = ignore_if_coin_type_mismatch.is_some_and(|ignore| {
116 + if ignore {
117 + read_coin_type.map_or(true, |read_coin_type| {
118 + self.coin_type.load(Ordering::Relaxed) != read_coin_type
119 + })
120 + } else {
121 + false
122 + }
123 ~ });
|
Check failure on line 50 in sdk/src/wallet/core/operations/stronghold_backup/stronghold_snapshot.rs
github-actions / Clippy Results for the Rust Core
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> sdk/src/wallet/core/operations/stronghold_backup/stronghold_snapshot.rs:48:59
|
48 | serialized_accounts.push(serde_json::to_value(&AccountDetailsDto::from(
| ___________________________________________________________^
49 | | &*account.details().await,
50 | | ))?);
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[deny(clippy::needless_borrows_for_generic_args)]` implied by `#[deny(warnings)]`
help: change this to
|
48 ~ serialized_accounts.push(serde_json::to_value(AccountDetailsDto::from(
49 + &*account.details().await,
50 ~ ))?);
|
Check failure on line 42 in sdk/src/wallet/core/operations/address_generation.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/core/operations/address_generation.rs:42:20
|
42 | if options.as_ref().map_or(false, |o| o.ledger_nano_prompt) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `options.as_ref().is_some_and(|o| o.ledger_nano_prompt)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
Check failure on line 66 in sdk/src/wallet/account/operations/transaction/input_selection.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/account/operations/transaction/input_selection.rs:64:28
|
64 | let required = mandatory_inputs.as_ref().map_or(false, |mandatory_inputs| {
| ____________________________^
65 | | mandatory_inputs.contains(&voting_output.output_id)
66 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
64 ~ let required = mandatory_inputs.as_ref().is_some_and(|mandatory_inputs| {
65 + mandatory_inputs.contains(&voting_output.output_id)
66 ~ });
|
Check failure on line 49 in sdk/src/wallet/account/operations/syncing/outputs.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/account/operations/syncing/outputs.rs:46:33
|
46 | let remainder = account_details
| _________________________________^
47 | | .transactions
48 | | .get(output_with_meta.metadata().transaction_id())
49 | | .map_or(false, |tx| !tx.incoming);
| |_____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
46 ~ let remainder = account_details
47 + .transactions
48 ~ .get(output_with_meta.metadata().transaction_id()).is_some_and(|tx| !tx.incoming);
|
Check failure on line 326 in sdk/src/wallet/account/operations/participation/mod.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/account/operations/participation/mod.rs:323:9
|
323 | / basic_output
324 | | .features()
325 | | .tag()
326 | | .map_or(false, |tag| tag.tag() == PARTICIPATION_TAG.as_bytes())
| |___________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
323 ~ basic_output
324 + .features()
325 + .tag().is_some_and(|tag| tag.tag() == PARTICIPATION_TAG.as_bytes())
|
Check failure on line 440 in sdk/src/wallet/account/operations/output_claiming.rs
github-actions / Clippy Results for the Rust Core
this `map_or` is redundant
error: this `map_or` is redundant
--> sdk/src/wallet/account/operations/output_claiming.rs:438:27
|
438 | let expired = unlock_conditions
| ___________________________^
439 | | .expiration()
440 | | .map_or(false, |expiration| current_time >= expiration.timestamp());
| |___________________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
438 ~ let expired = unlock_conditions
439 ~ .expiration().is_some_and(|expiration| current_time >= expiration.timestamp());
|
Check failure on line 361 in sdk/src/wallet/account/operations/output_claiming.rs
github-actions / Clippy Results for the Rust Core
usage of `HashSet::insert` after `HashSet::contains`
error: usage of `HashSet::insert` after `HashSet::contains`
--> sdk/src/wallet/account/operations/output_claiming.rs:361:48
|
361 | if !additional_inputs_used.contains(&output_data.output_id) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
376 | additional_inputs_used.insert(output_data.output_id);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#set_contains_or_insert
Check failure on line 340 in sdk/src/wallet/account/operations/balance.rs
github-actions / Clippy Results for the Rust Core
function call inside of `unwrap_or`
error: function call inside of `unwrap_or`
--> sdk/src/wallet/account/operations/balance.rs:340:80
|
340 | available: native_token.amount() - *locked_native_token_amount.unwrap_or(&U256::from(0u8)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| &U256::from(0u8))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
= note: `#[deny(clippy::or_fun_call)]` implied by `#[deny(clippy::nursery)]`
Check failure on line 122 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
unnecessary structure name repetition
error: unnecessary structure name repetition
--> sdk/src/types/mod.rs:122:24
|
122 | fn from(value: &'a ValidationParams<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
Check failure on line 121 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
unnecessary structure name repetition
error: unnecessary structure name repetition
--> sdk/src/types/mod.rs:121:19
|
121 | impl<'a> From<&'a ValidationParams<'a>> for ValidationParams<'a> {
| ^^^^^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
Check failure on line 109 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:109:6
|
109 | impl<'a> From<ProtocolParameters> for ValidationParams<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
109 - impl<'a> From<ProtocolParameters> for ValidationParams<'a> {
109 + impl From<ProtocolParameters> for ValidationParams<'_> {
|
Check failure on line 103 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:103:6
|
103 | impl<'a> From<u64> for ValidationParams<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
103 - impl<'a> From<u64> for ValidationParams<'a> {
103 + impl From<u64> for ValidationParams<'_> {
|
Check failure on line 66 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
unnecessary structure name repetition
error: unnecessary structure name repetition
--> sdk/src/types/mod.rs:66:24
|
66 | fn from(value: &'a Boo<'a, T>) -> Self {
| ^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
Check failure on line 65 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
unnecessary structure name repetition
error: unnecessary structure name repetition
--> sdk/src/types/mod.rs:65:22
|
65 | impl<'a, T> From<&'a Boo<'a, T>> for Boo<'a, T> {
| ^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `#[deny(clippy::use_self)]` implied by `#[deny(clippy::nursery)]`
Check failure on line 53 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:53:6
|
53 | impl<'a, T> From<T> for Boo<'a, T> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
53 - impl<'a, T> From<T> for Boo<'a, T> {
53 + impl<T> From<T> for Boo<'_, T> {
|
Check failure on line 42 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:42:6
|
42 | impl<'a, T> Deref for Boo<'a, T> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
42 - impl<'a, T> Deref for Boo<'a, T> {
42 + impl<T> Deref for Boo<'_, T> {
|
Check failure on line 36 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:36:6
|
36 | impl<'a, T> AsRef<T> for Boo<'a, T> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
36 - impl<'a, T> AsRef<T> for Boo<'a, T> {
36 + impl<T> AsRef<T> for Boo<'_, T> {
|
Check failure on line 24 in sdk/src/types/mod.rs
github-actions / Clippy Results for the Rust Core
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> sdk/src/types/mod.rs:24:6
|
24 | impl<'a, T> Boo<'a, T> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
24 - impl<'a, T> Boo<'a, T> {
24 + impl<T> Boo<'_, T> {
|