chore: 修复 clippy 错误(loop never loops → if-let)并应用自动修复

This commit is contained in:
2026-06-10 10:17:25 +08:00
parent 19dc54f842
commit f7d0781090
15 changed files with 60 additions and 123 deletions
+2 -3
View File
@@ -28,8 +28,8 @@ pub fn init_logger(log_dir: Option<&str>, with_file: bool) {
.with_target(false)
.with_ansi(true);
if with_file {
if let Some(dir) = log_dir {
if with_file
&& let Some(dir) = log_dir {
let dir_path = PathBuf::from(dir);
std::fs::create_dir_all(&dir_path).ok();
@@ -46,7 +46,6 @@ pub fn init_logger(log_dir: Option<&str>, with_file: bool) {
.init();
return;
}
}
tracing_subscriber::registry()
.with(env_filter)