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] 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 <krodak.konta@gmail.com>
---
 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 {