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.
This commit is contained in:
LGUG2Z committed 2026-10-31 12:38:08 -07:00
1 parent f9f47f3fb4
commit 5055e8a639
2 files changed
+3

No files matched your search

+2
View File
@@ -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 {
@@ -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)?;