fixes for nightly clippy (#1618)

This commit is contained in:
Svyatoslav Nikolsky
2022-10-28 11:46:40 +03:00
committed by Bastian Köcher
parent 9592b55fea
commit f58e076ca2
22 changed files with 45 additions and 45 deletions
+4 -4
View File
@@ -68,7 +68,7 @@ pub fn initialize_logger(with_timestamp: bool) {
let log_level = color_level(record.level());
let log_target = color_target(record.target());
writeln!(buf, "{}{} {} {}", loop_name_prefix(), log_level, log_target, record.args(),)
writeln!(buf, "{}{log_level} {log_target} {}", loop_name_prefix(), record.args(),)
});
}
@@ -92,7 +92,7 @@ fn loop_name_prefix() -> String {
if loop_name.is_empty() {
String::new()
} else {
format!("[{}] ", loop_name)
format!("[{loop_name}] ")
}
})
.unwrap_or_else(|_| String::new())
@@ -105,8 +105,8 @@ enum Either<A, B> {
impl<A: Display, B: Display> Display for Either<A, B> {
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Left(a) => write!(fmt, "{}", a),
Self::Right(b) => write!(fmt, "{}", b),
Self::Left(a) => write!(fmt, "{a}"),
Self::Right(b) => write!(fmt, "{b}"),
}
}
}