From 756a03cc77168f0c1f59fe38e1770e3dfe1a1e80 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:37:01 -0700 Subject: [PATCH] style(mac): use Option::filter for the non-empty window name (clippy::manual_filter) window.rs WindowInfo::from(&CFDictionary) spelled filter by hand with and_then; an empty name is still None. No behaviour change. Pre-existing on the original macOS tip 9a58e511 (reported by cargo clippy --all-targets -D warnings on the Mini, stable 1.93). Verified: fake-CC cargo clippy --locked --target aarch64-apple-darwin -p komorebi --all-targets -D warnings no longer reports this lint (see the last hygiene revision for the whole run). Verified on the Mini: not yet. --- komorebi-for-mac/komorebi/src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komorebi-for-mac/komorebi/src/window.rs b/komorebi-for-mac/komorebi/src/window.rs index 247b887e..595e6702 100644 --- a/komorebi-for-mac/komorebi/src/window.rs +++ b/komorebi-for-mac/komorebi/src/window.rs @@ -1587,7 +1587,7 @@ impl From<&CFDictionary> for WindowInfo { Self { name: cf_dictionary_value::(value, kCGWindowName) .map(|s| s.as_ref().to_string()) - .and_then(|s| if s.is_empty() { None } else { Some(s) }), + .filter(|s| !s.is_empty()), owner_pid: cf_dictionary_value::(value, kCGWindowOwnerPID) .and_then(|s| s.as_ref().as_i32()) .expect("window must have an owner process id"),