From 10995ec62cf719fc7ea4b75b3cf08f3d74b0e2d3 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 18 Apr 2026 08:17:44 +0300 Subject: [PATCH] Fix 1 new Clippy warning I don't like the other ones --- Cargo.toml | 1 + src/ipc/client.rs | 2 +- src/layout/floating.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b1cf2464..6a46154f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,6 +150,7 @@ dinit = [] [lints.clippy] new_without_default = "allow" +collapsible_match = "allow" [profile.release] debug = "line-tables-only" diff --git a/src/ipc/client.rs b/src/ipc/client.rs index 3c826bff..40a58efa 100644 --- a/src/ipc/client.rs +++ b/src/ipc/client.rs @@ -193,7 +193,7 @@ pub fn handle_msg(mut msg: Msg, json: bool) -> anyhow::Result<()> { return Ok(()); } - windows.sort_unstable_by(|a, b| a.id.cmp(&b.id)); + windows.sort_unstable_by_key(|a| a.id); for window in windows { print_window(&window); diff --git a/src/layout/floating.rs b/src/layout/floating.rs index c717e0db..d102f40d 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -490,6 +490,7 @@ impl FloatingSpace { // Now, descendants is in back-to-front order, and repositioning them in the front-to-back // order will preserve the subsequent indices and work out right. let mut idx = idx; + #[allow(clippy::explicit_counter_loop)] for descendant_idx in descendants.into_iter().rev() { self.raise_window(descendant_idx, idx); idx += 1;