enable format_push_string lint

This commit is contained in:
Charles Hall 2024-05-12 16:36:51 -07:00
parent 5fd156a6bb
commit bd6ea4e358
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 22 additions and 12 deletions

View file

@ -1,6 +1,7 @@
use std::{
collections::BTreeMap,
fmt,
fmt::Write,
net::{IpAddr, Ipv4Addr},
};
@ -191,7 +192,8 @@ 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);
writeln!(msg, "{}: {}", line.1 .0, line.1 .1)
.expect("write to in-memory buffer should succeed");
}
write!(f, "{msg}")