diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-07-30 02:11:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-30 02:11:28 +0200 |
commit | 14fdc631291a117b8a137b6fbbebfe3dea3a8697 (patch) | |
tree | bfe550ad295194dc0de779080a4e495dcf683161 /src-tauri/src/main.rs | |
parent | 40520344778a98c45817e9cbc00caab6ec3ea6bf (diff) | |
download | FlightCore-14fdc631291a117b8a137b6fbbebfe3dea3a8697.tar.gz FlightCore-14fdc631291a117b8a137b6fbbebfe3dea3a8697.zip |
refactor: Replace naive `game_path` argument with `GameInstall` (#454)
We should always pass the whole object instead of just a field for easier expandability in the future
Co-authored-by: Jan200101 <sentrycraft123@gmail.com>
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 476ee9cf..e1d99f61 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -234,7 +234,7 @@ pub fn convert_release_candidate_number(version_number: String) -> String { /// true -> Northstar install is outdated #[tauri::command] async fn check_is_northstar_outdated( - game_path: String, + game_install: GameInstall, northstar_package_name: Option<String>, ) -> Result<bool, String> { let northstar_package_name = match northstar_package_name { @@ -258,7 +258,7 @@ async fn check_is_northstar_outdated( .expect("Couldn't find Northstar on thunderstore???"); // .ok_or_else(|| anyhow!("Couldn't find Northstar on thunderstore???"))?; - let version_number = match northstar::get_northstar_version_number(&game_path) { + let version_number = match northstar::get_northstar_version_number(game_install) { Ok(version_number) => version_number, Err(err) => { log::warn!("{}", err); |