From 711796a01ded33f74c1d3fd6d2eef3160cbdda49 Mon Sep 17 00:00:00 2001 From: GyulyVGC Date: Sat, 7 Dec 2024 14:20:26 +0100 Subject: [PATCH] remove unsafe code block --- src/cli/mod.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 7dfe9e0c..f8e617a2 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -41,13 +41,10 @@ pub fn handle_cli_args() -> Task { std::process::exit(0); } else { // truncate logs file - unsafe { - std::fs::OpenOptions::new() - .write(true) - .truncate(true) - .open(logs_file) - .unwrap_unchecked(); - } + let _ = std::fs::OpenOptions::new() + .write(true) + .truncate(true) + .open(logs_file); } }