[pbs-devel] [PATCH proxmox-backup 2/2] pbs3to4: clippy: allow always true comparision against minimal value

Fiona Ebner f.ebner at proxmox.com
Wed Aug 6 12:07:03 CEST 2025


MIN_PBS_PKGREL is a constant that is zero, so the check is currently
superfluous, but that might not always be the case.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/bin/pbs3to4.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/pbs3to4.rs b/src/bin/pbs3to4.rs
index 46aa0a63..a60c77e2 100644
--- a/src/bin/pbs3to4.rs
+++ b/src/bin/pbs3to4.rs
@@ -98,6 +98,9 @@ impl Checker {
 
                 let min_version = format!("{MIN_PBS_MAJOR}.{MIN_PBS_MINOR}.{MIN_PBS_PKGREL}");
 
+                // MIN_PBS_PKGREL is currently zero, making the comparison further below
+                // superfluous, but this might not always be the case
+                #[allow(clippy::absurd_extreme_comparisons)]
                 if maj > MIN_PBS_MAJOR {
                     self.output
                         .log_pass(format!("Already upgraded to Proxmox Backup Server {maj}"))?;
-- 
2.47.2





More information about the pbs-devel mailing list