aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/repair_and_verify
diff options
context:
space:
mode:
authorcat_or_not <41955154+catornot@users.noreply.github.com>2023-04-16 15:55:09 -0400
committerGitHub <noreply@github.com>2023-04-16 21:55:09 +0200
commitc106e8ac0eafdbb1c7c549f93f7e8ad0d3cd558c (patch)
tree7b9a3f2ce86687b166411c4b72cd8e1f80a041c7 /src-tauri/src/repair_and_verify
parentd1d6c3001d0066d4774d4b92560f6098f78e689b (diff)
downloadFlightCore-c106e8ac0eafdbb1c7c549f93f7e8ad0d3cd558c.tar.gz
FlightCore-c106e8ac0eafdbb1c7c549f93f7e8ad0d3cd558c.zip
Use pass-by-reference where possible (#266)
Use pass-by-reference where possible also contains some other small changes
Diffstat (limited to 'src-tauri/src/repair_and_verify')
-rw-r--r--src-tauri/src/repair_and_verify/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs
index b3dbe3b2..ecf5e1ec 100644
--- a/src-tauri/src/repair_and_verify/mod.rs
+++ b/src-tauri/src/repair_and_verify/mod.rs
@@ -15,9 +15,9 @@ pub fn verify_game_files(game_install: GameInstall) -> Result<String, String> {
#[tauri::command]
pub fn disable_all_but_core(game_install: GameInstall) -> Result<(), String> {
// Rebuild `enabledmods.json` first to ensure all mods are added
- rebuild_enabled_mods_json(game_install.clone())?;
+ rebuild_enabled_mods_json(&game_install)?;
- let current_mods = get_enabled_mods(game_install.clone())?;
+ let current_mods = get_enabled_mods(&game_install)?;
// Disable all mods, set core mods to enabled
for (key, _value) in current_mods.as_object().unwrap() {
@@ -37,7 +37,7 @@ pub fn disable_all_but_core(game_install: GameInstall) -> Result<(), String> {
/// If `force` is FALSE, bails on non-empty folder
/// If `force` is TRUE, deletes folder even if non-empty
pub fn clean_up_download_folder(
- game_install: GameInstall,
+ game_install: &GameInstall,
force: bool,
) -> Result<(), anyhow::Error> {
// Get download directory