mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 09:57:59 +00:00
Simplified string conversion
This commit is contained in:
1 file changed
+1
-4
+1
-4
@@ -80,10 +80,7 @@ fn convert_log_path_to_string(log_path: &FileSpec) -> String {
|
|||||||
let log_path = log_path.as_pathbuf(None);
|
let log_path = log_path.as_pathbuf(None);
|
||||||
match log_path.canonicalize() {
|
match log_path.canonicalize() {
|
||||||
// Case: The path exists:
|
// Case: The path exists:
|
||||||
Ok(log_path) => match log_path.to_str() {
|
Ok(log_path) => log_path.to_str().unwrap().to_string(),
|
||||||
Some(path_string) => path_string.to_string(),
|
|
||||||
None => String::from(""),
|
|
||||||
}.to_string(),
|
|
||||||
|
|
||||||
// Case: The path does not exist. Let's try to build the
|
// Case: The path does not exist. Let's try to build the
|
||||||
// absolute path without touching the file system:
|
// absolute path without touching the file system:
|
||||||
|
|||||||
Reference in new issue
Block a user