mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:19:46 +00:00
Simplified string conversion
This commit is contained in:
parent
176f1f1daf
commit
ef5ff66939
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user