From e36329ff0ecdc8b7b277aff8fe38df4c29132ee1 Mon Sep 17 00:00:00 2001 From: Ap_Tx <3045929398@qq.com> Date: Sat, 10 Oct 2026 21:30:15 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=AA=97=E5=8F=A3=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E7=9A=84=20cargo=20fmt=20=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/app/src/lightweight_mode.rs | 4 ++-- .../src/state/instances/commands/edit_instance.rs | 3 ++- packages/app-lib/src/state/settings.rs | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/app/src/lightweight_mode.rs b/apps/app/src/lightweight_mode.rs index 7887e16..90db111 100644 --- a/apps/app/src/lightweight_mode.rs +++ b/apps/app/src/lightweight_mode.rs @@ -453,7 +453,8 @@ async fn rename_minecraft_window(pid: u32, title: &str) { unsafe { use windows::Win32::Foundation::LPARAM; use windows::Win32::UI::WindowsAndMessaging::EnumWindows; - let _ = EnumWindows(Some(rename_if_owned_by_process), LPARAM(0)); + let _ = + EnumWindows(Some(rename_if_owned_by_process), LPARAM(0)); } RENAME_WINDOW_HANDLE.load(Ordering::Relaxed) }; @@ -478,7 +479,6 @@ async fn rename_minecraft_window(pid: u32, title: &str) { #[cfg(not(target_os = "windows"))] async fn rename_minecraft_window(_pid: u32, _title: &str) {} - #[tauri::command] pub fn lightweight_mode_frontend_ready( app: AppHandle, diff --git a/packages/app-lib/src/state/instances/commands/edit_instance.rs b/packages/app-lib/src/state/instances/commands/edit_instance.rs index d6de374..881efd7 100644 --- a/packages/app-lib/src/state/instances/commands/edit_instance.rs +++ b/packages/app-lib/src/state/instances/commands/edit_instance.rs @@ -378,7 +378,8 @@ fn apply_launch_overrides_patch( overrides.game_resolution = game_resolution; } if let Some(window_title) = patch.window_title { - overrides.window_title = window_title.filter(|value| !value.trim().is_empty()); + overrides.window_title = + window_title.filter(|value| !value.trim().is_empty()); } if let Some(mode) = patch.instance_mode { overrides.instance_mode = Some(mode); diff --git a/packages/app-lib/src/state/settings.rs b/packages/app-lib/src/state/settings.rs index 5e75252..b309fd7 100644 --- a/packages/app-lib/src/state/settings.rs +++ b/packages/app-lib/src/state/settings.rs @@ -689,10 +689,12 @@ impl Settings { .bind(self.custom_window_title_enabled) .execute(exec) .await?; - sqlx::query("UPDATE settings SET default_window_title = ? WHERE id = 0") - .bind(self.default_window_title.trim()) - .execute(exec) - .await?; + sqlx::query( + "UPDATE settings SET default_window_title = ? WHERE id = 0", + ) + .bind(self.default_window_title.trim()) + .execute(exec) + .await?; sqlx::query("UPDATE settings SET mc_memory_optimize = ? WHERE id = 0") .bind(self.memory.optimize_before_launch) .execute(exec)