diff --git a/theseus/src/data/meta.rs b/theseus/src/data/meta.rs index 5c42fc925..7e2bddeac 100644 --- a/theseus/src/data/meta.rs +++ b/theseus/src/data/meta.rs @@ -73,12 +73,12 @@ impl Metadata { pub async fn fetch() -> Result { let (game, forge, fabric) = futures::future::join3( - daedalus::minecraft::fetch_version_manifest(Some(&*format!( + daedalus::minecraft::fetch_version_manifest(Some(&format!( "{}/minecraft/v0/manifest.json", META_URL ))), - daedalus::modded::fetch_manifest(&*format!("{}/forge/v0/manifest.json", META_URL)), - daedalus::modded::fetch_manifest(&*format!("{}/fabric/v0/manifest.json", META_URL)), + daedalus::modded::fetch_manifest(&format!("{}/forge/v0/manifest.json", META_URL)), + daedalus::modded::fetch_manifest(&format!("{}/fabric/v0/manifest.json", META_URL)), ) .await; diff --git a/theseus/src/data/settings.rs b/theseus/src/data/settings.rs index 55ab0e8cb..05a24f8ed 100644 --- a/theseus/src/data/settings.rs +++ b/theseus/src/data/settings.rs @@ -38,7 +38,7 @@ impl Settings { if settings_path.exists() { let settings_data = std::fs::read_to_string(settings_path) - .map(|x| serde_json::from_str::(&*x).ok()) + .map(|x| serde_json::from_str::(&x).ok()) .ok() .flatten(); @@ -52,7 +52,7 @@ impl Settings { std::fs::write( Path::new(LAUNCHER_WORK_DIR).join(SETTINGS_FILE), - &*serde_json::to_string(&new)?, + &serde_json::to_string(&new)?, )?; SETTINGS.get_or_init(|| RwLock::new(new)); diff --git a/theseus/src/launcher/args.rs b/theseus/src/launcher/args.rs index cbef78133..65dc3feba 100644 --- a/theseus/src/launcher/args.rs +++ b/theseus/src/launcher/args.rs @@ -108,7 +108,7 @@ pub fn get_jvm_arguments( } else { parsed_arguments.push(format!( "-Djava.library.path={}", - &*crate::util::absolute_path(natives_path) + &crate::util::absolute_path(natives_path) .map_err(|_| LauncherError::InvalidInput(format!( "Specified natives path {} does not exist", natives_path.to_string_lossy() @@ -153,7 +153,7 @@ fn parse_jvm_argument( ) .replace( "${library_directory}", - &*crate::util::absolute_path(libraries_path) + &crate::util::absolute_path(libraries_path) .map_err(|_| { LauncherError::InvalidInput(format!( "Specified libraries path {} does not exist", @@ -240,14 +240,14 @@ fn parse_minecraft_argument( .replace("${auth_access_token}", access_token) .replace("${auth_session}", access_token) .replace("${auth_player_name}", username) - .replace("${auth_uuid}", &*uuid.to_hyphenated().to_string()) + .replace("${auth_uuid}", &uuid.to_hyphenated().to_string()) .replace("${user_properties}", "{}") .replace("${user_type}", "mojang") .replace("${version_name}", version) .replace("${assets_index_name}", asset_index_name) .replace( "${game_directory}", - &*crate::util::absolute_path(game_directory) + &crate::util::absolute_path(game_directory) .map_err(|_| { LauncherError::InvalidInput(format!( "Specified game directory {} does not exist", @@ -259,7 +259,7 @@ fn parse_minecraft_argument( ) .replace( "${assets_root}", - &*crate::util::absolute_path(assets_directory) + &crate::util::absolute_path(assets_directory) .map_err(|_| { LauncherError::InvalidInput(format!( "Specified assets directory {} does not exist", @@ -271,7 +271,7 @@ fn parse_minecraft_argument( ) .replace( "${game_assets}", - &*crate::util::absolute_path(assets_directory) + &crate::util::absolute_path(assets_directory) .map_err(|_| { LauncherError::InvalidInput(format!( "Specified assets directory {} does not exist", @@ -282,8 +282,8 @@ fn parse_minecraft_argument( .to_string(), ) .replace("${version_type}", version_type.as_str()) - .replace("${resolution_width}", &*resolution.0.to_string()) - .replace("${resolution_height}", &*resolution.1.to_string())) + .replace("${resolution_width}", &resolution.0.to_string()) + .replace("${resolution_height}", &resolution.1.to_string())) } fn parse_arguments( diff --git a/theseus/src/launcher/download.rs b/theseus/src/launcher/download.rs index 85d3da439..2cd76191d 100644 --- a/theseus/src/launcher/download.rs +++ b/theseus/src/launcher/download.rs @@ -270,7 +270,7 @@ pub async fn download_file(url: &str, sha1: Option<&str>) -> Result bool { let regex = Regex::new(version.as_str()); if let Ok(regex) = regex { - if !regex.is_match(&*sys_info::os_release().unwrap_or_default()) { + if !regex.is_match(&sys_info::os_release().unwrap_or_default()) { return false; } } diff --git a/theseus_cli/src/main.rs b/theseus_cli/src/main.rs index c27ebdd6d..7f755fb76 100644 --- a/theseus_cli/src/main.rs +++ b/theseus_cli/src/main.rs @@ -1,4 +1,2 @@ -use theseus::launcher::{Credentials, ModLoader}; - #[tokio::main] async fn main() {}