style: simplify string interpolation

This commit is contained in:
Hamir Mahal authored and David Peter committed 2024-06-01 11:07:23 +02:00
1 parent e8ff88dad1
commit ef1263279d
13 files changed
+30 -33

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ impl Unit {
/// Returns the Second value formatted for the Unit.
pub fn format(self, value: Second) -> String {
match self {
Unit::Second => format!("{:.3}", value),
Unit::Second => format!("{value:.3}"),
Unit::MilliSecond => format!("{:.1}", value * 1e3),
Unit::MicroSecond => format!("{:.1}", value * 1e6),
}