From a806ac08c13fb414e2befec20efd7e9a083774ed Mon Sep 17 00:00:00 2001 From: Breadway Date: Mon, 31 Aug 2026 15:48:41 +0800 Subject: [PATCH] Clear clippy 1.97 lints (dead App fields, from_geom self-convention) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toolchain drift — pre-existing on main under clippy 0.1.97, both mechanical: `#[allow(dead_code)]` on the four held-for-lifetime sys-grid widget fields, and `#[allow(clippy::wrong_self_convention)]` on `from_geom` (`from` is the source button, not a conversion). --- src/bar/workspaces.rs | 3 +++ src/main.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/bar/workspaces.rs b/src/bar/workspaces.rs index 8a1023c..26e4cdc 100644 --- a/src/bar/workspaces.rs +++ b/src/bar/workspaces.rs @@ -431,6 +431,9 @@ impl WorkspaceTrail { self.inner.borrow_mut().tick = Some(id); } + // `from` is a noun here (the source button we animate away from), not a + // conversion — `&self` is correct. + #[allow(clippy::wrong_self_convention)] fn from_geom(&self, from: Option<>k4::Button>, to: >k4::Button) -> Option { let st = self.inner.borrow(); let live = if self.pill.is_visible() && st.geom.w > 0.5 { diff --git a/src/main.rs b/src/main.rs index 7a03b40..fe1ae21 100644 --- a/src/main.rs +++ b/src/main.rs @@ -217,10 +217,16 @@ pub struct App { // ── Stats bar ───────────────────────────────────────────────────────── // Island chrome matches the Liquid Motion demo: volume / wifi / battery // / hamburger. CPU/RAM/power live in the control panel, not on the bar. + // Held to keep the control-panel sys-grid widgets alive for the App's + // lifetime; their parent boxes own them, so they're never read back. + #[allow(dead_code)] system_stats_box: gtk4::Box, system_sep: gtk4::Separator, + #[allow(dead_code)] cpu_pair: gtk4::Box, + #[allow(dead_code)] mem_pair: gtk4::Box, + #[allow(dead_code)] pwr_pair: gtk4::Box, gpu_pair: gtk4::Box, cpu_lbl: gtk4::Label,