diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2022-11-02 21:26:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 21:26:03 +0100 |
commit | d8232fa953a08aafce71e0bc9823c554eed59d7c (patch) | |
tree | 27e8376f84486e426d6f3ac44a592bf9f14e31cf /src-tauri/src/main.rs | |
parent | 4e0323020a794139bf3c809a9a70d87be3f2885c (diff) | |
download | FlightCore-d8232fa953a08aafce71e0bc9823c554eed59d7c.tar.gz FlightCore-d8232fa953a08aafce71e0bc9823c554eed59d7c.zip |
refactor: Return error string instead of anyhow!() (#36)
All that is returned as the error type is a string so there's no point
in using a custom error type when we can just have the error type be a
string.
Co-authored-by: Remy Raes <contact@remyraes.com>
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 670baf0b..a0f502b6 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -98,13 +98,7 @@ fn main() { #[tauri::command] /// Wrapper for `find_game_install_location` as tauri doesn't allow passing `Result<>` types to front-end async fn find_game_install_location_caller() -> Result<GameInstall, String> { - match find_game_install_location() { - Ok(game_install) => Ok(game_install), - Err(err) => { - println!("{}", err); - Err(err.to_string()) - } - } + find_game_install_location() } #[tauri::command] |