chore: update to Rust 2024 edition

This commit is contained in:
mayor
2026-01-04 20:08:16 +01:00
committed by Michel de Graaf
parent f7ebcccdd3
commit 16c8a4bde9
9 changed files with 39 additions and 55 deletions
+2 -3
View File
@@ -167,12 +167,11 @@ pub fn log(level: LogLevel, message: &str) {
buffer.push(formatted_message.clone());
}
// But ALSO write to file if configured (file logging bypasses buffering)
if let Ok(mut log_file) = LOG_FILE.lock() {
if let Some(file) = log_file.as_mut() {
if let Ok(mut log_file) = LOG_FILE.lock()
&& let Some(file) = log_file.as_mut() {
let _ = writeln!(file, "{}", formatted_message_plain);
let _ = file.flush();
}
}
} else {
// Write to file if configured, otherwise to stderr
if let Ok(mut log_file) = LOG_FILE.lock() {