feat: add get_seed() for stronghold #8728
Clippy Results for the Rust Core
166 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 166 |
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 34 in sdk/src/client/mod.rs
github-actions / Clippy Results for the Rust Core
creating a shared reference to mutable static is discouraged
error: creating a shared reference to mutable static is discouraged
--> sdk/src/client/mod.rs:34:18
|
34 | unsafe { VALUE.as_ref() }.expect("failed to get lazy static value")
| ^^^^^ shared reference to mutable static
|
::: sdk/src/client/node_api/mqtt/types.rs:172:28
|
172 | let valid_topics = lazy_static!(
| ____________________________-
173 | | RegexSet::new([
174 | | // Milestone topics.
175 | | r"^milestone-info/latest$",
... |
196 | | r"^receipts$",
197 | | ]).expect("cannot build regex set") => RegexSet);
| |____________________________________________________________- in this macro invocation
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
= note: `#[deny(static_mut_refs)]` implied by `#[deny(warnings)]`
= note: this error originates in the macro `lazy_static` (in Nightly builds, run with -Z macro-backtrace for more info)
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 49 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:47:59
|
47 | serialized_accounts.push(serde_json::to_value(&AccountDetailsDto::from(
| ___________________________________________________________^
48 | | &*account.details().await,
49 | | ))?);
| |_____________^
|
= 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
|
47 ~ serialized_accounts.push(serde_json::to_value(AccountDetailsDto::from(
48 + &*account.details().await,
49 ~ ))?);
|
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 325 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:322:9
|
322 | / basic_output
323 | | .features()
324 | | .tag()
325 | | .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
|
322 ~ basic_output
323 + .features()
324 + .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> {
|