From c527e9d533135da7087b3069ac2b4d42f4daf994 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 10 May 2024 19:45:35 +0200 Subject: Crappy code fix 2/? --- launcher/src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 28813f6..959b517 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -11,23 +11,23 @@ fn get_home() -> PathBuf { #[cfg(target_os = "macos")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}/Library/Frameworks/AtomicRuntime.framework", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("/Library/Frameworks/AtomicRuntime.framework"); + path } #[cfg(target_os = "linux")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}/.local/share/atomic-runtime", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("/.local/share/atomic-runtime"); + path } #[cfg(target_os = "windows")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}\\AppData\\Local\\Atomic Runtime", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("\\AppData\\Local\\Atomic Runtime"); + path } #[cfg(target_os = "macos")] -- cgit