mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-23 00:44:15 +01:00
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.
This commit is contained in:
1 parent
75688cf74f
commit
5cdb1ab33a
1 file changed
+4
-6
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user