Simplified string conversion

This commit is contained in:
Thorsten Sommer 2025-03-03 14:45:35 +01:00
parent 176f1f1daf
commit ef5ff66939
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -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: