remove two unnecessary string heap allocs
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
a9f714ae8d
commit
04d16ac544
3 changed files with 7 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue