Enable clippy's or_fun_call linter (#7222)

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
Justin Traglia
2024-03-19 10:52:41 -05:00
committed by GitHub
parent 553a271533
commit 11bedc1884
14 changed files with 19 additions and 19 deletions

View File

@ -51,11 +51,10 @@ impl LogFormat {
let target = std::env::var("RUST_LOG_TARGET")
// `RUST_LOG_TARGET` always overrides default behaviour
.map(|val| val != "0")
.unwrap_or(
.unwrap_or_else(|_|
// If `RUST_LOG_TARGET` is not set, show target in logs only if the max enabled
// level is higher than INFO (DEBUG, TRACE)
filter.max_level_hint().map_or(true, |max_level| max_level > tracing::Level::INFO),
);
filter.max_level_hint().map_or(true, |max_level| max_level > tracing::Level::INFO));
match self {
LogFormat::Json => {