Use variables directly inside format strings
Most systems should have an up to date Rust compiler by now, so we should be fine.
This commit is contained in:
@@ -9,7 +9,7 @@ pub fn format_duration(d: &std::time::Duration) -> String {
|
||||
let mut s = String::new();
|
||||
let mut append_unit = |value, unit| {
|
||||
if value > 0 {
|
||||
let _ = write!(s, "{}{}", value, unit);
|
||||
let _ = write!(s, "{value}{unit}");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user