From 69aee5bc68e5afcf0b12e1144ce471c325a59276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 9 May 2026 22:22:36 -0400 Subject: [PATCH] Resolve clippy warnings in this round's changes Three nits clippy flagged on the round 13 + 14 commits. Fix each: * `RangeInclusive::contains` for the sidebar reveal-threshold guard. * Reword the popover-anchor doc-comments so the `+ tile` lines don't get parsed as Markdown list items. * Collapse the `if let Some(text)` + nested `if` in the external web keyboard handler into a single `let-and-and` chain. No behavior change. cargo clippy -p ely_app: clean. cargo test --workspace: 440 passed, 0 failed. --- crates/ely_app/src/shell/chrome/sidebar_header.rs | 10 +++++----- crates/ely_app/src/shell/render.rs | 2 +- crates/ely_app/src/shell/web_surface_keyboard.rs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/ely_app/src/shell/chrome/sidebar_header.rs b/crates/ely_app/src/shell/chrome/sidebar_header.rs index 410cf0c..83dd2ff 100644 --- a/crates/ely_app/src/shell/chrome/sidebar_header.rs +++ b/crates/ely_app/src/shell/chrome/sidebar_header.rs @@ -231,13 +231,13 @@ pub(crate) fn render_workspace_disclosure_backdrop( } /// Anchor of the disclosure popover relative to the window's top-left. -/// Walks the sidebar layout: SHELL_INSET (16) + sidebar header pt (8) -/// + title row h (20) + header gap (8) + picker row py-top (4) + tile -/// height (32) + picker row py-bot (4) + popover lift (6) = 98. +/// Walks the sidebar layout — SHELL_INSET 16 plus sidebar header pt 8 +/// plus title row h 20 plus header gap 8 plus picker row py-top 4 plus +/// tile height 32 plus picker row py-bot 4 plus popover lift 6 = 98. const DISCLOSURE_TOP_PX: f32 = 98.0; -/// Left edge of the disclosure: SHELL_INSET (16) + header px-left (10) -/// + picker row px-left (2) + tile width (32) + picker gap (6) = 66. +/// Left edge of the disclosure — SHELL_INSET 16 plus header px-left 10 +/// plus picker row px-left 2 plus tile width 32 plus picker gap 6 = 66. /// That lines the disclosure up with the picker pill, not the tile. const DISCLOSURE_LEFT_PX: f32 = 66.0; diff --git a/crates/ely_app/src/shell/render.rs b/crates/ely_app/src/shell/render.rs index 1753f1c..319ae35 100644 --- a/crates/ely_app/src/shell/render.rs +++ b/crates/ely_app/src/shell/render.rs @@ -236,7 +236,7 @@ impl ElyShell { return; } - if cursor_x >= REVEAL_THRESHOLD_PX && cursor_x <= COLLAPSE_THRESHOLD_PX { + if (REVEAL_THRESHOLD_PX..=COLLAPSE_THRESHOLD_PX).contains(&cursor_x) { return; } diff --git a/crates/ely_app/src/shell/web_surface_keyboard.rs b/crates/ely_app/src/shell/web_surface_keyboard.rs index ab8773f..ae45a06 100644 --- a/crates/ely_app/src/shell/web_surface_keyboard.rs +++ b/crates/ely_app/src/shell/web_surface_keyboard.rs @@ -21,10 +21,10 @@ impl ElyShell { return; } - if let Some(text) = special_key_text(event) { - if self.type_text_in_external_web_viewport(tab_id, requested_url, text, cx) { - cx.stop_propagation(); - } + if let Some(text) = special_key_text(event) + && self.type_text_in_external_web_viewport(tab_id, requested_url, text, cx) + { + cx.stop_propagation(); } }