From 87bba4ec288bfe43d00421d93f066db6fc0d2bb2 Mon Sep 17 00:00:00 2001 From: Brain Wang Date: Thu, 29 Oct 2026 09:58:40 +0800 Subject: [PATCH] MENU-BAR: merge the native menu's identical quit/about/settings branches (clippy::if_same_then_else) Co-Authored-By: Claude Sonnet 5.5 --- apps/lightcraft/src/native_menu.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/lightcraft/src/native_menu.rs b/apps/lightcraft/src/native_menu.rs index a5a14e208..0a14918a8 100644 --- a/apps/lightcraft/src/native_menu.rs +++ b/apps/lightcraft/src/native_menu.rs @@ -489,9 +489,7 @@ impl NativeMenu { // events never reach `shortcuts::handle`, so this is the one guard for AppKit's // accelerators and clicks: while the blocking library window or a quit/settings notice // owns input, a queued command is dropped (Quit stays for the existing confirmation). - let (cmd, params) = if key == QUIT { - (key, serde_json::json!({})) - } else if key == "app.about" || key == SETTINGS { + let (cmd, params) = if key == QUIT || key == "app.about" || key == SETTINGS { (key, serde_json::json!({})) } else if let Some(it) = self.items.get(&key) { (it.cmd.clone(), it.params.clone())