aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-04-02 18:02:22 +0200
committerGitHub <noreply@github.com>2023-04-02 18:02:22 +0200
commitb4e68d085da69e68529720bd3faf1dd3ad369a74 (patch)
treef8bf9f944047981d92ec02b08f504e8a9dfc4112 /src-tauri/src/lib.rs
parent8070b7cad817058b922316a7baea42c38b77055f (diff)
downloadFlightCore-b4e68d085da69e68529720bd3faf1dd3ad369a74.tar.gz
FlightCore-b4e68d085da69e68529720bd3faf1dd3ad369a74.zip
fix: Another set of various clippy fixes (#246)
* fix: Remove unnecessary clone * fix: Remove redundant field name in struct init * fix: Single-char string constant used as pattern * fix: calling `push_str()` using a single-character string literal * fix: this pattern reimplements `Option::unwrap_or` * fix: Remove unnecessary borrow * fix: Remove useless use of `format!` * fix: called `inspect(..).for_each(..)` on an `Iterator` * fix: Formatting
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 3bcbdfa6..ff1445e5 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -113,7 +113,7 @@ pub fn find_game_install_location() -> Result<GameInstall, String> {
match windows::origin_install_location_detection() {
Ok(game_path) => {
let game_install = GameInstall {
- game_path: game_path,
+ game_path,
install_type: InstallType::ORIGIN,
};
return Ok(game_install);
@@ -190,7 +190,7 @@ async fn do_install(nmod: &thermite::model::ModVersion, game_path: &std::path::P
std::fs::create_dir_all(download_directory.clone())?;
- let download_path = format!("{}/{}", download_directory.clone(), filename);
+ let download_path = format!("{}/{}", download_directory, filename);
log::info!("Download path: {download_path}");
let nfile = thermite::core::manage::download_file(&nmod.url, download_path).unwrap();
@@ -282,10 +282,7 @@ pub fn launch_northstar(
));
}
- let bypass_checks = match bypass_checks {
- Some(bypass_checks) => bypass_checks,
- None => false,
- };
+ let bypass_checks = bypass_checks.unwrap_or(false);
// Only check guards if bypassing checks is not enabled
if !bypass_checks {