aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/mod_management
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-01-22 19:14:55 +0100
committerGitHub <noreply@github.com>2023-01-22 19:14:55 +0100
commita69d79bb4be922faebd3b43fe2fd6d14d916ed16 (patch)
tree5cfaa4a7b0ebaa7a80d9d228305ffda6f81b05c9 /src-tauri/src/mod_management
parent5ba596cc67856b0a6335130b1e43808adaba978e (diff)
downloadFlightCore-a69d79bb4be922faebd3b43fe2fd6d14d916ed16.tar.gz
FlightCore-a69d79bb4be922faebd3b43fe2fd6d14d916ed16.zip
chore: Autoformat Rust source files (#143)
Diffstat (limited to 'src-tauri/src/mod_management')
-rw-r--r--src-tauri/src/mod_management/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index e45fa3c1..c37882fe 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -184,7 +184,10 @@ fn parse_for_thunderstore_mod_string(nsmod_path: String) -> Result<String, anyho
file.read_to_string(&mut thunderstore_author)?;
// Build mod string
- let thunderstore_mod_string = format!("{}-{}-{}", thunderstore_author, thunderstore_manifest.name, thunderstore_manifest.version_number);
+ let thunderstore_mod_string = format!(
+ "{}-{}-{}",
+ thunderstore_author, thunderstore_manifest.name, thunderstore_manifest.version_number
+ );
Ok(thunderstore_mod_string)
}
@@ -226,11 +229,10 @@ fn parse_installed_mods(game_install: GameInstall) -> Result<Vec<NorthstarMod>,
}
};
// Get Thunderstore mod string if it exists
- let thunderstore_mod_string =
- match parse_for_thunderstore_mod_string(directory_str) {
- Ok(thunderstore_mod_string) => Some(thunderstore_mod_string),
- Err(_err) => None,
- };
+ let thunderstore_mod_string = match parse_for_thunderstore_mod_string(directory_str) {
+ Ok(thunderstore_mod_string) => Some(thunderstore_mod_string),
+ Err(_err) => None,
+ };
// Get directory path
let mod_directory = directory.to_str().unwrap().to_string();
@@ -409,13 +411,11 @@ pub async fn fc_download_mod_and_install(
let author = thunderstore_mod_string.split("-").next().unwrap();
// Extract the mod to the mods directory
- match thermite::core::manage::install_mod(author, &f, std::path::Path::new(&mods_directory))
- {
+ match thermite::core::manage::install_mod(author, &f, std::path::Path::new(&mods_directory)) {
Ok(()) => (),
Err(err) => return Err(err.to_string()),
};
-
// Delete downloaded zip file
std::fs::remove_file(path).unwrap();