From 4e508c347a0cbc0ea33dd4f86e8614965f70ce2f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:59:50 -0700 Subject: [PATCH] fix(bar): the macOS bar module's leftovers from the old layout (unused imports, f32 literal) On the Mac Mini native clippy -D warnings failed in the macOS bar module with three findings that the fake-CC check only printed as warnings: the re-exports of ICONS_CACHE and ImageIconId in macos/widgets/mod.rs are unused (they were pub items of the crate root before the module move, which the lint does not flag), and Stroke::new(1.0, ...) in macos/widgets/komorebi.rs:393 falls back to f32. The two re-exports are removed (grep: nothing in the macOS module uses them; the Windows module does and keeps them), the literal is 1.0_f32 (the type it already had). The same sweep removed the #[allow(unused_imports)] re-export of rgba_to_color_image, also unused on macOS. Remaining pub use lines (render, selected_frame, ui, statics, Alignment) are used. Behaviour identical. Gates run: macOS fake-CC check of komorebi-bar and komorebi-bar-macos --all-targets: no warning left in the bar; Windows clippy -D warnings PASS; S/bar2 schemas byte-identical. Not run: native macOS clippy (the Mini). --- komorebi-bar/src/macos/widgets/komorebi.rs | 2 +- komorebi-bar/src/macos/widgets/mod.rs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/komorebi-bar/src/macos/widgets/komorebi.rs b/komorebi-bar/src/macos/widgets/komorebi.rs index e95a98c8..25e6808d 100644 --- a/komorebi-bar/src/macos/widgets/komorebi.rs +++ b/komorebi-bar/src/macos/widgets/komorebi.rs @@ -390,7 +390,7 @@ impl WorkspacesBar { .show(ui, |ui| { let (response, painter) = ui.allocate_painter(self.icon_size, Sense::hover()); let stroke: Stroke = Stroke::new( - 1.0, + 1.0_f32, if ws.is_selected { ctx.style().visuals.selection.stroke.color } else { diff --git a/komorebi-bar/src/macos/widgets/mod.rs b/komorebi-bar/src/macos/widgets/mod.rs index e34ad182..a429e6b8 100644 --- a/komorebi-bar/src/macos/widgets/mod.rs +++ b/komorebi-bar/src/macos/widgets/mod.rs @@ -12,8 +12,4 @@ pub use komorebi_bar_core::widgets::time; pub use komorebi_bar_core::widgets::update; pub mod widget; -pub use komorebi_bar_core::widgets::icons::ICONS_CACHE; pub use komorebi_bar_core::widgets::icons::ImageIcon; -pub use komorebi_bar_core::widgets::icons::ImageIconId; -#[allow(unused_imports)] -pub use komorebi_bar_core::widgets::icons::rgba_to_color_image;