From c1c573ae46c2588e88fec0c304f35f9d8db57c33 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin <11879032+Dmitry-Borodin@users.noreply.github.com> Date: Mon, 6 May 2024 10:16:12 -0500 Subject: [PATCH 1/2] fix: fixed clippy style issues (#2392) * fix: fixed clippy style issues * fixed other clippy issue * workaround for clippy complains at to_string * chore: revert todo to avoid spellcheck failure --------- Co-authored-by: Krzysztof Rodak --- rust/db_handling/src/interface_signer.rs | 4 ++-- rust/generate_message/src/helpers.rs | 2 +- rust/transaction_signing/src/sign_transaction.rs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rust/db_handling/src/interface_signer.rs b/rust/db_handling/src/interface_signer.rs index 557343ae02..a11562e271 100644 --- a/rust/db_handling/src/interface_signer.rs +++ b/rust/db_handling/src/interface_signer.rs @@ -85,13 +85,13 @@ pub fn get_all_seed_names_with_identicons( .entry(address_details.seed_name.to_string()) .and_modify(|e| *e += 1) .or_insert(1); - if data_set.get(&address_details.seed_name).is_none() { + if !data_set.contains_key(&address_details.seed_name) { data_set.insert(address_details.seed_name.to_string(), Identicon::default()); } } } for x in names_phone_knows.iter() { - if data_set.get(x).is_none() { + if !data_set.contains_key(x) { data_set.insert(x.to_string(), Identicon::default()); } } diff --git a/rust/generate_message/src/helpers.rs b/rust/generate_message/src/helpers.rs index 67b84cd274..03d411b22b 100644 --- a/rust/generate_message/src/helpers.rs +++ b/rust/generate_message/src/helpers.rs @@ -779,7 +779,7 @@ pub fn update_modify_encryption_specs( specs.title = optional_signer_title_override.unwrap_or(format!("{}-{}", specs.name, encryption.show())); - specs.encryption = encryption.to_owned(); + encryption.clone_into(&mut specs.encryption); Ok(()) } diff --git a/rust/transaction_signing/src/sign_transaction.rs b/rust/transaction_signing/src/sign_transaction.rs index a5456bd15d..69d8db1613 100644 --- a/rust/transaction_signing/src/sign_transaction.rs +++ b/rust/transaction_signing/src/sign_transaction.rs @@ -35,6 +35,7 @@ impl SignatureAndChecksum { } } +#[allow(clippy::to_string_trait_impl)] impl ToString for SignatureAndChecksum { fn to_string(&self) -> String { match self.signature_type { From 0c64197f5acedc7c93da3c59ae32d39fbd40be55 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin <11879032+Dmitry-Borodin@users.noreply.github.com> Date: Mon, 6 May 2024 23:56:15 -0500 Subject: [PATCH 2/2] chore: update code owners (#2389) Co-authored-by: Krzysztof Rodak --- CODEOWNERS | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 42e641821e..db5bafdd38 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -22,10 +22,4 @@ /.gitlab-ci.yml @paritytech/ci /ios @tetekinandrey @krodak /android @Dmitry-Borodin -/android/src/main/java/io/parity/signer/ui @tetekinandrey @Dmitry-Borodin -/android/src/main/java/io/parity/signer/screens @tetekinandrey @Dmitry-Borodin -/android/src/main/java/io/parity/signer/components @tetekinandrey @Dmitry-Borodin -/android/src/main/java/io/parity/signer/components2 @tetekinandrey @Dmitry-Borodin -/android/src/main/java/io/parity/signer/bottmsheets @tetekinandrey @Dmitry-Borodin -/rust @prybalko /rust/signer/src/signer.udl @Dmitry-Borodin @krodak