From d712f2ffd14c74f285433c7e99be1a32737d9db5 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 18 Oct 2026 11:34:43 +0700 Subject: [PATCH] #776: collapse the nested if in select.none (clippy) --- crates/ui-egui/src/shortcuts.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs index 50fee385..695457af 100644 --- a/crates/ui-egui/src/shortcuts.rs +++ b/crates/ui-egui/src/shortcuts.rs @@ -212,10 +212,10 @@ pub fn swallowed_paste(app: &mut FigApp, ctx: &Context) -> Swallowed { pub fn run_binding(app: &mut FigApp, id: &str) { match id { "select.none" => { - if let Some(ctx) = &app.ui_context { - if crate::proto_panel::close_editor(ctx) { - return; - } + if let Some(ctx) = &app.ui_context + && crate::proto_panel::close_editor(ctx) + { + return; } if let Err(e) = app.session.escape() { app.toast(e.to_string());