[pbs-devel] [PATCH backup 3/8] api: remove redundant guard
Maximiliano Sandoval
m.sandoval at proxmox.com
Thu Mar 6 14:12:30 CET 2025
Fixes the redundant_guards clippy lint.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
src/api2/status/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api2/status/mod.rs b/src/api2/status/mod.rs
index 5efde9c3..e066a99c 100644
--- a/src/api2/status/mod.rs
+++ b/src/api2/status/mod.rs
@@ -150,7 +150,7 @@ pub async fn datastore_status(
if usage_list.len() >= 7 {
entry.estimated_full_date = match linear_regression(&time_list, &usage_list) {
Some((a, b)) if b != 0.0 => Some(((1.0 - a) / b).floor() as i64),
- Some((_, b)) if b == 0.0 => Some(0), // infinite estimate, set to past for gui to detect
+ Some((_, 0.0)) => Some(0), // infinite estimate, set to past for gui to detect
_ => None,
};
}
--
2.39.5
More information about the pbs-devel
mailing list