diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 18:36:10 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 18:36:10 +0200 |
commit | 80b8b2c318fbb04853a813c438c896a4b2f8b37d (patch) | |
tree | deebbe224307a6d78948a6c2c2e5c8dfcf3540a9 /src-tauri/src/main.rs | |
parent | 578516b2bcbfa2c80e02d51951d99e3083360749 (diff) | |
download | FlightCore-80b8b2c318fbb04853a813c438c896a4b2f8b37d.tar.gz FlightCore-80b8b2c318fbb04853a813c438c896a4b2f8b37d.zip |
Return GameInstall object instead of tuple
The object contains the path Titanfall2 is installed in, as well as how
it was installed (Steam, Origin, EA-App)
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 34caddc7..2ba190bb 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -11,7 +11,7 @@ use std::{ use app::{ check_is_valid_game_path, find_game_install_location, get_northstar_version_number, - install_northstar, + install_northstar, GameInstall, }; use tauri::{Manager, State}; use tokio::time::sleep; @@ -63,9 +63,9 @@ fn main() { #[tauri::command] /// Wrapper for `find_game_install_location` as tauri doesn't allow passing `Result<>` types to front-end -fn find_game_install_location_caller() -> Result<String, String> { +fn find_game_install_location_caller() -> Result<GameInstall, String> { match find_game_install_location() { - Ok((path, install_type)) => Ok(path), + Ok(game_install) => Ok(game_install), Err(err) => { println!("{}", err); Err(err.to_string()) |