From 5cdb1ab33a52de01533408254fdb27f6719531ad Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:51:24 -0700 Subject: [PATCH] fix(bar-core): WidgetConfig::supported as matches! clippy::match_like_matches_macro (-D warnings, seen by native clippy on the Mac Mini) flagged the match with a Keyboard/Media/Systray arm of cfg!(target_os = "windows") and a true arm. The same boolean is written !matches!(self, Keyboard | Media | Systray) || cfg!(target_os = "windows"): false only for those three variants off Windows. Behaviour identical. Gates run: Windows clippy -D warnings PASS; native cargo clippy -p komorebi-bar-core --all-targets -D warnings PASS; bar-core tests (3 unit + 6 oracle) PASS; macOS fake-CC check PASS. --- crates/komorebi-bar-core/src/widgets/widget.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/komorebi-bar-core/src/widgets/widget.rs b/crates/komorebi-bar-core/src/widgets/widget.rs index 5e2ef7d9..b8638582 100644 --- a/crates/komorebi-bar-core/src/widgets/widget.rs +++ b/crates/komorebi-bar-core/src/widgets/widget.rs @@ -72,12 +72,10 @@ impl WidgetConfig { /// accepted and skipped (see [`WidgetConfig::unsupported`]). #[must_use] pub const fn supported(&self) -> bool { - match self { - WidgetConfig::Keyboard(_) | WidgetConfig::Media(_) | WidgetConfig::Systray(_) => { - cfg!(target_os = "windows") - } - _ => true, - } + !matches!( + self, + WidgetConfig::Keyboard(_) | WidgetConfig::Media(_) | WidgetConfig::Systray(_) + ) || cfg!(target_os = "windows") } /// The name of this widget when the platform cannot run it.