From 5055e8a639492d1d983377818dbe4a910631ea50 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:37:19 -0700 Subject: [PATCH] style(mac): allow clippy::collapsible_match at three nested ifs, with a reason monitor.rs (two ifs that choose where a moved container goes, inside a match on the layout) and static_config.rs handle_asc_file (a 40-line block under the extension check). The lint wants the if folded into the outer match arm as a guard; doing that restructures the arms (the else branches become extra arms) without changing what they do, which is more edit than a lint fix should be and cannot be run here, so each site gets an allow with a comment instead. No behaviour change. Pre-existing on the original macOS tip 9a58e511. Verified: fake-CC cargo clippy --locked --target aarch64-apple-darwin -p komorebi --all-targets -D warnings: the daemon lib and its tests are clean with the six hygiene and ptr_arg revisions applied (the whole-workspace run still reports newer-clippy lints that the Mini's 1.93 does not have: the bar's f32 literal fallback and examples/capture_spike.rs chunks_exact). Verified on the Mini: not yet. --- komorebi-for-mac/komorebi/src/monitor.rs | 2 ++ komorebi-for-mac/komorebi/src/static_config.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/komorebi-for-mac/komorebi/src/monitor.rs b/komorebi-for-mac/komorebi/src/monitor.rs index 47713613..967abe51 100644 --- a/komorebi-for-mac/komorebi/src/monitor.rs +++ b/komorebi-for-mac/komorebi/src/monitor.rs @@ -467,6 +467,7 @@ impl Monitor { workspace.add_container_to_front(container); } DefaultLayout::UltrawideVerticalStack => { + #[allow(clippy::collapsible_match)] // the outer match has one arm per layout; collapsing would restructure it if workspace.containers().len() == 1 { workspace.insert_container_at_idx(0, container); } else { @@ -489,6 +490,7 @@ impl Monitor { match layout { DefaultLayout::RightMainVerticalStack | DefaultLayout::UltrawideVerticalStack => { + #[allow(clippy::collapsible_match)] // the outer match has one arm per layout; collapsing would restructure it if workspace.containers().len() == 1 { workspace.add_container_to_back(container); } else { diff --git a/komorebi-for-mac/komorebi/src/static_config.rs b/komorebi-for-mac/komorebi/src/static_config.rs index ccc5b865..6fbb0341 100644 --- a/komorebi-for-mac/komorebi/src/static_config.rs +++ b/komorebi-for-mac/komorebi/src/static_config.rs @@ -1256,6 +1256,7 @@ fn handle_asc_file( match path.extension() { None => {} Some(ext) => { + #[allow(clippy::collapsible_match)] // collapsing the nested if into a guard would restructure a 40-line block if ext.to_string_lossy().to_string().as_str() == "json" { tracing::info!("loading applications.json from: {}", path.display()); let mut asc = ApplicationSpecificConfiguration::load(path)?;