[pbs-devel] [PATCH proxmox-backup 8/8] http-client: further clippy cleanups

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jan 20 17:23:55 CET 2021


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/client/http_client.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/client/http_client.rs b/src/client/http_client.rs
index 567a6b73..f279d9dd 100644
--- a/src/client/http_client.rs
+++ b/src/client/http_client.rs
@@ -156,7 +156,7 @@ fn store_fingerprint(prefix: &str, server: &str, fingerprint: &str) -> Result<()
     raw.split('\n').for_each(|line| {
         let items: Vec<String> = line.split_whitespace().map(String::from).collect();
         if items.len() == 2 {
-            if &items[0] == server {
+            if items[0] == server {
                 // found, add later with new fingerprint
             } else {
                 result.push_str(line);
@@ -186,7 +186,7 @@ fn load_fingerprint(prefix: &str, server: &str) -> Option<String> {
 
     for line in raw.split('\n') {
         let items: Vec<String> = line.split_whitespace().map(String::from).collect();
-        if items.len() == 2 && &items[0] == server {
+        if items.len() == 2 && items[0] == server {
             return Some(items[1].clone());
         }
     }
@@ -371,7 +371,7 @@ impl HttpClient {
             server.to_owned(),
             port,
             auth_id.user().clone(),
-            password.to_owned(),
+            password,
         ).map_ok({
             let server = server.to_string();
             let prefix = options.prefix.clone();
-- 
2.20.1






More information about the pbs-devel mailing list