From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup 2/8] run cargo clippy --fix
Date: Thu, 6 Mar 2025 14:12:29 +0100 [thread overview]
Message-ID: <20250306131235.452521-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250306131235.452521-1-m.sandoval@proxmox.com>
The actual incantation is:
clippy --all-targets --workspace --all-features --fix
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
pbs-datastore/src/prune.rs | 10 +++++-----
src/api2/admin/datastore.rs | 2 +-
src/tools/disks/mod.rs | 6 ++++++
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/pbs-datastore/src/prune.rs b/pbs-datastore/src/prune.rs
index ad1493bf..7b6f9f75 100644
--- a/pbs-datastore/src/prune.rs
+++ b/pbs-datastore/src/prune.rs
@@ -124,13 +124,13 @@ pub fn compute_prune_info(
if let Some(keep_hourly) = options.keep_hourly {
mark_selections(&mut mark, &list, keep_hourly as usize, |info| {
- strftime_local("%Y/%m/%d/%H", info.backup_dir.backup_time()).map_err(Error::from)
+ strftime_local("%Y/%m/%d/%H", info.backup_dir.backup_time())
})?;
}
if let Some(keep_daily) = options.keep_daily {
mark_selections(&mut mark, &list, keep_daily as usize, |info| {
- strftime_local("%Y/%m/%d", info.backup_dir.backup_time()).map_err(Error::from)
+ strftime_local("%Y/%m/%d", info.backup_dir.backup_time())
})?;
}
@@ -138,19 +138,19 @@ pub fn compute_prune_info(
mark_selections(&mut mark, &list, keep_weekly as usize, |info| {
// Note: Use iso-week year/week here. This year number
// might not match the calendar year number.
- strftime_local("%G/%V", info.backup_dir.backup_time()).map_err(Error::from)
+ strftime_local("%G/%V", info.backup_dir.backup_time())
})?;
}
if let Some(keep_monthly) = options.keep_monthly {
mark_selections(&mut mark, &list, keep_monthly as usize, |info| {
- strftime_local("%Y/%m", info.backup_dir.backup_time()).map_err(Error::from)
+ strftime_local("%Y/%m", info.backup_dir.backup_time())
})?;
}
if let Some(keep_yearly) = options.keep_yearly {
mark_selections(&mut mark, &list, keep_yearly as usize, |info| {
- strftime_local("%Y", info.backup_dir.backup_time()).map_err(Error::from)
+ strftime_local("%Y", info.backup_dir.backup_time())
})?;
}
diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index dbb7ae47..cfe319c4 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -2556,7 +2556,7 @@ fn expect_maintanance_unmounting(
if store_config
.get_maintenance_mode()
- .map_or(true, |m| m.ty != MaintenanceType::Unmount)
+ .is_none_or(|m| m.ty != MaintenanceType::Unmount)
{
bail!("maintenance mode is not 'Unmount'");
}
diff --git a/src/tools/disks/mod.rs b/src/tools/disks/mod.rs
index e08ea8ca..b9aef368 100644
--- a/src/tools/disks/mod.rs
+++ b/src/tools/disks/mod.rs
@@ -830,6 +830,12 @@ pub struct DiskUsageQuery {
partitions: bool,
}
+impl Default for DiskUsageQuery {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl DiskUsageQuery {
pub const fn new() -> Self {
Self {
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-03-06 13:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 13:12 [pbs-devel] [PATCH backup 1/8] server: remove needless clone Maximiliano Sandoval
2025-03-06 13:12 ` Maximiliano Sandoval [this message]
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 3/8] api: remove redundant guard Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 4/8] snapshot_reader: replace Arc with Rc Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 5/8] fix the type_complexity clippy lint Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 6/8] create a CachedSchema struct Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 7/8] zfs: remove unnecessary arc from dataset object map Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 8/8] add too_many_arguments clippy exception Maximiliano Sandoval
2025-03-06 14:00 ` [pbs-devel] applied-series: [PATCH backup 1/8] server: remove needless clone 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=20250306131235.452521-2-m.sandoval@proxmox.com \
--to=m.sandoval@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.