From 9ae91303fdd1f4479f2b830f84609e11130a80e3 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 17 Oct 2024 11:40:21 +0200 Subject: [PATCH] time: switch to inline template variables Signed-off-by: Thomas Lamprecht --- proxmox-time/src/time_span.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-time/src/time_span.rs b/proxmox-time/src/time_span.rs index 2f8dd1c1..c645ac38 100644 --- a/proxmox-time/src/time_span.rs +++ b/proxmox-time/src/time_span.rs @@ -149,7 +149,7 @@ impl std::fmt::Display for TimeSpan { write!(f, " ")?; } first = false; - write!(f, "{}{}", v, unit) + write!(f, "{v}{unit}") }; if self.years > 0 { do_write(self.years, "y")?; @@ -176,9 +176,9 @@ impl std::fmt::Display for TimeSpan { write!(f, " ")?; } if seconds >= 1.0 || !first { - write!(f, "{:.0}s", seconds)?; + write!(f, "{seconds:.0}s")?; } else { - write!(f, "{:.1}s", seconds)?; + write!(f, "{seconds:.1}s")?; } } else if first { write!(f, "<0.1s")?;