all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/7] tree wide: fix useless borrow warnings
Date: Mon, 28 Jul 2025 14:40:00 +0200	[thread overview]
Message-ID: <20250728124006.868999-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250728124006.868999-1-c.ebner@proxmox.com>

Fix the useless borrows reported by `cargo clippy`.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 pbs-config/src/datastore.rs        | 2 +-
 pbs-datastore/src/datastore.rs     | 6 +++---
 src/api2/config/tape_backup_job.rs | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pbs-config/src/datastore.rs b/pbs-config/src/datastore.rs
index 5a5553dbc..4aecc0d3c 100644
--- a/pbs-config/src/datastore.rs
+++ b/pbs-config/src/datastore.rs
@@ -117,7 +117,7 @@ pub fn complete_calendar_event(_arg: &str, _param: &HashMap<String, String>) ->
 /// Returns the datastore backend type from it's name
 pub fn datastore_backend_type(store: &str) -> Result<pbs_api_types::DatastoreBackendType, Error> {
     let (config, _) = config()?;
-    let store_config: DataStoreConfig = config.lookup("datastore", &store)?;
+    let store_config: DataStoreConfig = config.lookup("datastore", store)?;
 
     let backend_config: pbs_api_types::DatastoreBackendConfig = serde_json::from_value(
         pbs_api_types::DatastoreBackendConfig::API_SCHEMA
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index e8be576f7..e3c0589a4 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1780,7 +1780,7 @@ impl DataStore {
         delete_list: &mut Vec<S3ObjectKey>,
         gc_status: &mut GarbageCollectionStatus,
     ) -> Result<bool, Error> {
-        let (chunk_path, digest) = match self.chunk_path_from_object_key(&object_key) {
+        let (chunk_path, digest) = match self.chunk_path_from_object_key(object_key) {
             Some(path) => path,
             None => return Ok(false),
         };
@@ -2218,7 +2218,7 @@ impl DataStore {
                 .await?
                 .context("failed to set maintenance mode")?;
 
-                let tmp_base = proxmox_sys::fs::make_tmp_dir(&self.base_path(), None)
+                let tmp_base = proxmox_sys::fs::make_tmp_dir(self.base_path(), None)
                     .context("failed to create temporary content folder in {store_base}")?;
 
                 if let Err(err) = async {
@@ -2377,7 +2377,7 @@ impl DataStore {
             .with_context(|| format!("failed to refresh {:?}", self.base_path()))?;
         }
 
-        std::fs::remove_dir_all(&tmp_base)
+        std::fs::remove_dir_all(tmp_base)
             .with_context(|| format!("failed to cleanup temporary content in {tmp_base:?}"))?;
 
         Ok(())
diff --git a/src/api2/config/tape_backup_job.rs b/src/api2/config/tape_backup_job.rs
index 786acde06..38dbe9747 100644
--- a/src/api2/config/tape_backup_job.rs
+++ b/src/api2/config/tape_backup_job.rs
@@ -185,7 +185,7 @@ pub fn update_tape_backup_job(
     digest: Option<String>,
 ) -> Result<(), Error> {
     if let Some(store) = &update.setup.store {
-        assert_datastore_type(&store)?;
+        assert_datastore_type(store)?;
     }
     let _lock = pbs_config::tape_job::lock()?;
 
-- 
2.47.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2025-07-28 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 12:39 [pbs-devel] [PATCH proxmox-backup 0/7] remove objects from s3 backend on datastore destroy Christian Ebner
2025-07-28 12:40 ` Christian Ebner [this message]
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 2/7] client: backup writer: elide lifetime which can be auto inferred Christian Ebner
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 3/7] api: tape: fix clippy warning on map iteration Christian Ebner
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 4/7] datastore: fix clippy warning checking file extension Christian Ebner
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 5/7] datastore: fix clippy warning to use ? on option Christian Ebner
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 6/7] datastore: add helper to get s3 client from datastore config Christian Ebner
2025-07-28 12:40 ` [pbs-devel] [PATCH proxmox-backup 7/7] datastore: delete all objects on datastore destroy with remove data Christian Ebner
2025-07-29 13:53 ` [pbs-devel] [PATCH proxmox-backup 0/7] remove objects from s3 backend on datastore destroy Lukas Wagner
2025-07-29 16:54   ` Christian Ebner
2025-07-30  7:59 ` [pbs-devel] superseded: " Christian Ebner

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=20250728124006.868999-2-c.ebner@proxmox.com \
    --to=c.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal