From 8d40bca06dc8eea63c5eb7e4ae93f38e29654c7b Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sun, 27 Nov 2022 20:35:11 +0100 Subject: refactor: Make var containing core mods pub const (#74) This way we only define them in one place --- src-tauri/src/northstar/mod.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src-tauri/src/northstar') diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs index a7ec044a..8adfeec2 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -1,6 +1,12 @@ //! This module deals with handling things around Northstar such as //! - getting version number +pub const CORE_MODS: [&str; 3] = [ + "Northstar.Client", + "Northstar.Custom", + "Northstar.CustomServers", +]; + use crate::check_mod_version_number; use anyhow::anyhow; @@ -12,20 +18,15 @@ pub fn get_northstar_version_number(game_path: String) -> Result version_number, Err(err) => return Err(err), }; - for core_mod in core_mods { + for core_mod in CORE_MODS { let current_version_number = match check_mod_version_number(format!( "{}/{}/mods/{}", game_path, profile_folder, core_mod -- cgit v1.2.3