From ff132abc70b222c7584b8e33185507d69742f442 Mon Sep 17 00:00:00 2001 From: a-wing <1@233.email> Date: Thu, 12 Oct 2023 22:17:36 +0800 Subject: [PATCH] style: fix log_level --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f0326b85..c3d102d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,7 @@ mod path; #[tokio::main] async fn main() { - let log_level = env::var("LOG_LEVEL").unwrap_or_else(|_| "info".to_string()); + let log_level = env::var("LOG_LEVEL").unwrap_or("info".to_string()); let level_filter = match log_level.as_str() { "off" => log::LevelFilter::Off, "error" => log::LevelFilter::Error, @@ -36,7 +36,7 @@ async fn main() { "info" => log::LevelFilter::Info, "debug" => log::LevelFilter::Debug, "trace" => log::LevelFilter::Trace, - _ => log::LevelFilter::Info, + _ => log::LevelFilter::Info, }; env_logger::builder() .filter_level(level_filter)