From: Robert Obkircher <r.obkircher@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH v1 proxmox-backup 1/8] tree-wide: fix clippy::useless_borrows_in_formatting
Date: Tue, 3 Nov 2026 12:28:37 +0100 [thread overview]
Message-ID: <20261103113054.184327-2-r.obkircher@proxmox.com> (raw)
In-Reply-To: <20261103113054.184327-1-r.obkircher@proxmox.com>
cargo clippy --fix -- -A clippy::all -D clippy::useless_borrows_in_formatting
Signed-off-by: Robert Obkircher <r.obkircher@proxmox.com>
---
src/api2/access/mod.rs | 2 +-
src/api2/admin/datastore.rs | 4 ++--
src/api2/config/datastore.rs | 2 +-
src/api2/node/disks/directory.rs | 2 +-
src/api2/node/disks/zfs.rs | 2 +-
src/api2/node/services.rs | 2 +-
src/server/verify_job.rs | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/api2/access/mod.rs b/src/api2/access/mod.rs
index 2b38806c0..b6ea58317 100644
--- a/src/api2/access/mod.rs
+++ b/src/api2/access/mod.rs
@@ -207,7 +207,7 @@ pub fn list_permissions(
path: &str,
) -> HashSet<String> {
for (sub_path, child_node) in node.children {
- let sub_path = format!("{}/{}", path, &sub_path);
+ let sub_path = format!("{}/{}", path, sub_path);
paths = populate_acl_paths(paths, child_node, &sub_path);
paths.insert(sub_path);
}
diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index 3367fb2c1..e286784e8 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -1453,7 +1453,7 @@ pub fn download_file(
tokio_util::codec::FramedRead::new(file, tokio_util::codec::BytesCodec::new())
.map_ok(|bytes| bytes.freeze())
.map_err(move |err| {
- eprintln!("error during streaming of '{:?}' - {}", &path, err);
+ eprintln!("error during streaming of '{:?}' - {}", path, err);
err
});
let body = Body::wrap_stream(payload);
@@ -2803,7 +2803,7 @@ async fn do_unmount(store: String, auth_id: Authid, to_stdout: bool) -> Result<V
sock,
&format!(
"{{\"command\":\"update-datastore-cache\",\"args\":\"{}\"}}\n",
- &store
+ store
),
)
.await;
diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index e7028480c..9f1351233 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -667,7 +667,7 @@ pub fn update_datastore(
sock,
&format!(
"{{\"command\":\"update-datastore-cache\",\"args\":\"{}\"}}\n",
- &name
+ name
),
)
.await;
diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
index 573e11744..c0db8e4b4 100644
--- a/src/api2/node/disks/directory.rs
+++ b/src/api2/node/disks/directory.rs
@@ -185,7 +185,7 @@ pub fn create_datastore_disk(
bail!("disk '{}' is already in use.", disk);
}
- let mount_point = format!("{}/{}", DATASTORE_MOUNT_DIR, &name);
+ let mount_point = format!("{}/{}", DATASTORE_MOUNT_DIR, name);
// check if the default path exists already.
// bail if it is not empty or another filesystem mounted on top
let default_path = std::path::PathBuf::from(&mount_point);
diff --git a/src/api2/node/disks/zfs.rs b/src/api2/node/disks/zfs.rs
index 7a62e3f70..254311291 100644
--- a/src/api2/node/disks/zfs.rs
+++ b/src/api2/node/disks/zfs.rs
@@ -210,7 +210,7 @@ pub fn create_zpool(
bail!("{:?} needs at least {} disks.", raidlevel, min_disks);
}
- let mount_point = format!("/mnt/datastore/{}", &name);
+ let mount_point = format!("/mnt/datastore/{}", name);
// check if the default path does exist already and bail if it does
// otherwise 'zpool create' aborts after partitioning, but before creating the pool
diff --git a/src/api2/node/services.rs b/src/api2/node/services.rs
index 0f1b4d031..50763a215 100644
--- a/src/api2/node/services.rs
+++ b/src/api2/node/services.rs
@@ -185,7 +185,7 @@ fn get_service_state(service: String, _param: Value) -> Result<Value, Error> {
}
fn run_service_command(service: &str, cmd: &str, auth_id: Authid) -> Result<Value, Error> {
- let workerid = format!("srv{}", &cmd);
+ let workerid = format!("srv{}", cmd);
let cmd = match cmd {
"start" | "stop" | "restart" => cmd.to_string(),
diff --git a/src/server/verify_job.rs b/src/server/verify_job.rs
index ecc04d4af..adb84358f 100644
--- a/src/server/verify_job.rs
+++ b/src/server/verify_job.rs
@@ -22,7 +22,7 @@ pub fn do_verification_job(
let ignore_verified_snapshots = verification_job.ignore_verified.unwrap_or(true);
// FIXME encode namespace here for filter/ACL check?
- let job_id = format!("{}:{}", &verification_job.store, job.jobname());
+ let job_id = format!("{}:{}", verification_job.store, job.jobname());
let worker_type = job.jobtype().to_string();
let upid_str = WorkerTask::new_thread(
&worker_type,
--
2.47.3
next prev parent reply other threads:[~2026-11-03 11:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 11:28 [PATCH v1 proxmox-backup 0/8] fix warnings and rust edition incompatibilities Robert Obkircher
2026-11-03 11:28 ` Robert Obkircher [this message]
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 2/8] tape: fix clippy::question_mark Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 3/8] api: fix clippy::unnecessary_lazy_evaluations Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 4/8] cargo: update minimum rust version to 1.91 Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 5/8] tree-wide: mark extern blocks as unsafe and add some safety comments Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 6/8] tree-wide: remove redundant ref keyword in pattern matches Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 7/8] tree-wide: add empty use<> bounds to return position impl traits Robert Obkircher
2026-11-03 11:28 ` [PATCH v1 proxmox-backup 8/8] cargo: remove unused dependencies Robert Obkircher
2026-11-05 11:07 ` applied-series: [PATCH v1 proxmox-backup 0/8] fix warnings and rust edition incompatibilities Fabian Grünbichler
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=20261103113054.184327-2-r.obkircher@proxmox.com \
--to=r.obkircher@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