public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup-qemu 2/6] clippy fixes
Date: Mon, 12 Dec 2022 13:05:37 +0100	[thread overview]
Message-ID: <20221212120541.1909975-3-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20221212120541.1909975-1-f.gruenbichler@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 src/commands.rs     | 8 ++++----
 src/upload_queue.rs | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/commands.rs b/src/commands.rs
index 27d958c..37d653c 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -74,7 +74,7 @@ async fn register_zero_chunk(
 
     let param = json!({
         "wid": wid,
-        "digest": hex::encode(&zero_chunk_digest),
+        "digest": hex::encode(zero_chunk_digest),
         "size": chunk_size,
         "encoded-size": chunk_data.len(),
     });
@@ -212,7 +212,7 @@ pub(crate) async fn register_image(
         let csum = PREVIOUS_CSUMS.lock().unwrap().get(&device_name).copied();
 
         if let Some(csum) = csum {
-            param["reuse-csum"] = hex::encode(&csum).into();
+            param["reuse-csum"] = hex::encode(csum).into();
 
             match index {
                 Some(index) => {
@@ -308,7 +308,7 @@ pub(crate) async fn close_image(
         }
     };
 
-    let csum = hex::encode(&upload_result.csum);
+    let csum = hex::encode(upload_result.csum);
 
     let param = json!({
         "wid": wid ,
@@ -399,7 +399,7 @@ pub(crate) async fn write_data(
                 Box::new(futures::future::ok(upload_info))
             } else {
                 let (chunk, digest) = chunk_builder.build()?;
-                let digest_str = hex::encode(&digest);
+                let digest_str = hex::encode(digest);
                 let chunk_data = chunk.into_inner();
 
                 let param = json!({
diff --git a/src/upload_queue.rs b/src/upload_queue.rs
index 941734b..261886c 100644
--- a/src/upload_queue.rs
+++ b/src/upload_queue.rs
@@ -111,7 +111,7 @@ async fn upload_handler(
                 size,
                 chunk_is_known,
             }) => {
-                let digest_str = hex::encode(&digest);
+                let digest_str = hex::encode(digest);
 
                 //println!("upload_handler {:?} {}", digest, offset);
                 let pos = (offset / chunk_size) as usize;
-- 
2.30.2





  parent reply	other threads:[~2022-12-12 12:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 12:05 [pbs-devel] [PATCH proxmox-backup-qemu 0/6] update to current PBS/dependencies Fabian Grünbichler
2022-12-12 12:05 ` [pbs-devel] [PATCH proxmox-backup-qemu 1/6] update dependencies Fabian Grünbichler
2022-12-12 13:41   ` [pbs-devel] [PATCH FIXUP proxmox-backup-qemu] fixup: update to current PBS head Fabian Grünbichler
2022-12-12 12:05 ` Fabian Grünbichler [this message]
2022-12-12 12:05 ` [pbs-devel] [PATCH proxmox-backup-qemu 3/6] clippy fix: shorten bool->i32 conversion Fabian Grünbichler
2022-12-12 12:05 ` [pbs-devel] [RFC proxmox-backup-qemu 4/6] lint fix: explicitly drop Box Fabian Grünbichler
2022-12-12 12:05 ` [pbs-devel] [PATCH proxmox-backup-qemu 5/6] update edition to 2021 Fabian Grünbichler
2022-12-12 12:05 ` [pbs-devel] [PATCH proxmox-backup-qemu 6/6] bump version to 1.3.2-1 and update symbols file Fabian Grünbichler
2022-12-12 14:14 ` [pbs-devel] applied-series: [PATCH proxmox-backup-qemu 0/6] update to current PBS/dependencies Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221212120541.1909975-3-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal