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

@ -1,6 +1,7 @@
use std::{
collections::BTreeMap,
fmt,
fmt::Write as _,
net::{IpAddr, Ipv4Addr},
path::PathBuf,
};
@ -398,7 +399,7 @@ impl fmt::Display for Config {
let mut msg: String = "Active config values:\n\n".to_owned();
for line in lines.into_iter().enumerate() {
msg += &format!("{}: {}\n", line.1 .0, line.1 .1);
let _ = writeln!(msg, "{}: {}", line.1 .0, line.1 .1);
}
write!(f, "{msg}")