From f07bc86711536b5b744aca7a32adaac00202220f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sat, 26 Apr 2025 20:44:49 +0200 Subject: [PATCH] chore: remove dead `profile_run_credentials` plugin command --- apps/app/build.rs | 1 - apps/app/src/api/profile.rs | 17 ----------------- packages/app-lib/src/api/profile/mod.rs | 3 +-- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/apps/app/build.rs b/apps/app/build.rs index 644d22b68..4fe82cfbc 100644 --- a/apps/app/build.rs +++ b/apps/app/build.rs @@ -151,7 +151,6 @@ fn main() { "profile_update_managed_modrinth_version", "profile_repair_managed_modrinth", "profile_run", - "profile_run_credentials", "profile_kill", "profile_edit", "profile_edit_icon", diff --git a/apps/app/src/api/profile.rs b/apps/app/src/api/profile.rs index db979be35..1d812639e 100644 --- a/apps/app/src/api/profile.rs +++ b/apps/app/src/api/profile.rs @@ -28,7 +28,6 @@ pub fn init() -> tauri::plugin::TauriPlugin { profile_update_managed_modrinth_version, profile_repair_managed_modrinth, profile_run, - profile_run_credentials, profile_kill, profile_edit, profile_edit_icon, @@ -256,22 +255,6 @@ pub async fn profile_run(path: &str) -> Result { Ok(process) } -// Run Minecraft using a profile using chosen credentials -// Returns the UUID, which can be used to poll -// for the actual Child in the state. -// invoke('plugin:profile|profile_run_credentials', {path, credentials})') -#[tauri::command] -pub async fn profile_run_credentials( - path: &str, - credentials: Credentials, -) -> Result { - let process = - profile::run_credentials(path, &credentials, &QuickPlayType::None) - .await?; - - Ok(process) -} - #[tauri::command] pub async fn profile_kill(path: &str) -> Result<()> { profile::kill(path).await?; diff --git a/packages/app-lib/src/api/profile/mod.rs b/packages/app-lib/src/api/profile/mod.rs index 5c10f6433..da12fe309 100644 --- a/packages/app-lib/src/api/profile/mod.rs +++ b/packages/app-lib/src/api/profile/mod.rs @@ -642,9 +642,8 @@ pub async fn run( } /// Run Minecraft using a profile, and credentials for authentication -/// Returns Arc pointer to RwLock to Child #[tracing::instrument(skip(credentials))] -pub async fn run_credentials( +async fn run_credentials( path: &str, credentials: &Credentials, quick_play_type: &QuickPlayType,