diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-03-26 20:25:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 20:25:20 +0200 |
commit | cec86b682d68016e2142b27e7674d77807c3330c (patch) | |
tree | 26e8fcc9c8fe305aa8301fdca819644300b1c4ee /src-tauri/src | |
parent | 28da58763c7d69c9837da79748e175b04b2bf557 (diff) | |
download | FlightCore-cec86b682d68016e2142b27e7674d77807c3330c.tar.gz FlightCore-cec86b682d68016e2142b27e7674d77807c3330c.zip |
fix: Remove redundant string conversions (#242)
As pointed out by clippy
Diffstat (limited to 'src-tauri/src')
-rw-r--r-- | src-tauri/src/github/pull_requests.rs | 2 | ||||
-rw-r--r-- | src-tauri/src/main.rs | 4 | ||||
-rw-r--r-- | src-tauri/src/mod_management/mod.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs index 45a11c1c..8fc769f0 100644 --- a/src-tauri/src/github/pull_requests.rs +++ b/src-tauri/src/github/pull_requests.rs @@ -68,7 +68,7 @@ pub enum PullRequestType { pub async fn get_pull_requests(url: String) -> Result<Vec<PullsApiResponseElement>, String> { let json_response = match fetch_github_releases_api(&url).await { Ok(result) => result, - Err(err) => return Err(err.to_string()), + Err(err) => return Err(err), }; let pulls_response: Vec<PullsApiResponseElement> = match serde_json::from_str(&json_response) { diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 4d03e967..fb3a8bb2 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -289,7 +289,7 @@ async fn install_northstar_caller( Ok(_) => Ok(true), Err(err) => { log::error!("{}", err); - Err(err.to_string()) + Err(err) } } } @@ -307,7 +307,7 @@ async fn update_northstar_caller( Ok(_) => Ok(true), Err(err) => { log::error!("{}", err); - Err(err.to_string()) + Err(err) } } } diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index eff3ec01..41b2c13b 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -343,10 +343,10 @@ pub async fn fc_download_mod_and_install( match fc_download_mod_and_install(game_install.clone(), dep).await { Ok(()) => (), Err(err) => { - if err.to_string() == "Cannot install Northstar as a mod!" { + if err == "Cannot install Northstar as a mod!" { continue; // For Northstar as a dependency, we just skip it } else { - return Err(err.to_string()); + return Err(err); } } }; |