remove two unnecessary string heap allocs

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-02 17:33:46 -05:00 committed by June
parent a9f714ae8d
commit 04d16ac544
3 changed files with 7 additions and 5 deletions

View file

@ -4,7 +4,7 @@ use std::{
time::Instant,
};
use std::fmt::Write;
use std::fmt::Write as _;
use clap::{Parser, Subcommand};
use regex::Regex;
@ -1730,8 +1730,9 @@ impl Service {
for (r, (e, i)) in map.iter() {
let elapsed = i.elapsed();
msg += &format!(
"{} {}: {}m{}s\n",
let _ = writeln!(
msg,
"{} {}: {}m{}s",
r,
e,
elapsed.as_secs() / 60,