From 5fd674a48bfa7d36ec3e59cd703eb0ec0e363c7d Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Wed, 14 Sep 2022 18:40:31 +0200 Subject: Use variable instead of hard-coded string --- src-tauri/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-tauri/src/lib.rs') diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 0e8adbf0..df83de80 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -233,10 +233,12 @@ async fn do_install(nmod: &thermite::model::Mod, game_path: &std::path::Path) -> } pub async fn install_northstar(game_path: &str) -> Result { + let northstar_package_name = "Northstar".to_lowercase(); + let index = thermite::api::get_package_index().await.unwrap().to_vec(); let nmod = index .iter() - .find(|f| f.name.to_lowercase() == "northstar") + .find(|f| f.name.to_lowercase() == northstar_package_name) .ok_or_else(|| panic!("Couldn't find Northstar on thunderstore???")) .unwrap(); -- cgit v1.2.3