From ef5ff669395f678f5ecd6c28db33ab1accbd0f58 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 3 Mar 2025 14:45:35 +0100 Subject: [PATCH] Simplified string conversion --- runtime/src/log.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runtime/src/log.rs b/runtime/src/log.rs index 3987f8d1..f91d326f 100644 --- a/runtime/src/log.rs +++ b/runtime/src/log.rs @@ -80,10 +80,7 @@ fn convert_log_path_to_string(log_path: &FileSpec) -> String { let log_path = log_path.as_pathbuf(None); match log_path.canonicalize() { // Case: The path exists: - Ok(log_path) => match log_path.to_str() { - Some(path_string) => path_string.to_string(), - None => String::from(""), - }.to_string(), + Ok(log_path) => log_path.to_str().unwrap().to_string(), // Case: The path does not exist. Let's try to build the // absolute path without touching the file system: