diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-02-06 21:59:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 21:59:46 +0100 |
commit | acd8a26fcd68ffa7ecd0451279a6b64a44e28b53 (patch) | |
tree | 051690a7fe1fa60dfb4ced939c1f290d0beff095 /src-tauri/src | |
parent | 782588f66d4e72df53376d1e8aa96c35d3225d8c (diff) | |
download | FlightCore-acd8a26fcd68ffa7ecd0451279a6b64a44e28b53.tar.gz FlightCore-acd8a26fcd68ffa7ecd0451279a6b64a44e28b53.zip |
chore: Bump libthermite version to 0.5.2 (#163)
And fix corresponding code that broke in the process
Basically just removing `await`s as the networking functions are no
longer async.
Diffstat (limited to 'src-tauri/src')
-rw-r--r-- | src-tauri/src/lib.rs | 6 | ||||
-rw-r--r-- | src-tauri/src/main.rs | 2 | ||||
-rw-r--r-- | src-tauri/src/mod_management/mod.rs | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e43e5935..1ae55a6f 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -192,9 +192,7 @@ async fn do_install(nmod: &thermite::model::ModVersion, game_path: &std::path::P let download_path = format!("{}/{}", download_directory.clone(), filename); println!("{}", download_path); - let nfile = thermite::core::manage::download_file(&nmod.url, download_path) - .await - .unwrap(); + let nfile = thermite::core::manage::download_file(&nmod.url, download_path).unwrap(); println!("Extracting Northstar..."); extract(nfile, game_path)?; @@ -223,7 +221,7 @@ pub async fn install_northstar( None => "Northstar".to_string(), }; - let index = thermite::api::get_package_index().await.unwrap().to_vec(); + let index = thermite::api::get_package_index().unwrap().to_vec(); let nmod = index .iter() .find(|f| f.name.to_lowercase() == northstar_package_name.to_lowercase()) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 4eab7a00..ba9264ee 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -185,7 +185,7 @@ async fn check_is_northstar_outdated( None => "Northstar".to_string(), }; - let index = thermite::api::get_package_index().await.unwrap().to_vec(); + let index = thermite::api::get_package_index().unwrap().to_vec(); let nmod = index .iter() .find(|f| f.name.to_lowercase() == northstar_package_name.to_lowercase()) diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index 01e2cbb5..90dc85da 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -261,7 +261,7 @@ pub fn get_installed_mods_and_properties( async fn get_ns_mod_download_url(thunderstore_mod_string: String) -> Result<String, String> { // TODO: This will crash the thread if not internet connection exist. `match` should be used instead - let index = thermite::api::get_package_index().await.unwrap().to_vec(); + let index = thermite::api::get_package_index().unwrap().to_vec(); // Parse mod string let parsed_ts_mod_string: ParsedThunderstoreModString = match thunderstore_mod_string.parse() { @@ -297,7 +297,7 @@ async fn get_mod_dependencies( dbg!(thunderstore_mod_string.clone()); // TODO: This will crash the thread if not internet connection exist. `match` should be used instead - let index = thermite::api::get_package_index().await.unwrap().to_vec(); + let index = thermite::api::get_package_index().unwrap().to_vec(); // String replace works but more care should be taken in the future let ts_mod_string_url = thunderstore_mod_string.replace("-", "/"); @@ -379,7 +379,7 @@ pub async fn fc_download_mod_and_install( ); // Download the mod - let f = match thermite::core::manage::download_file(&download_url, path.clone()).await { + let f = match thermite::core::manage::download_file(&download_url, path.clone()) { Ok(f) => f, Err(e) => return Err(e.to_string()), }; |