forge
Explore
Log in

Don't you dare go Hollow

Fix 1 new Clippy warning

Browse files at this commit

10995ec62cf719fc7ea4b75b3cf08f3d74b0e2d3Ivan MolodetskikhParent: c814c65
I don't like the other ones
Cargo.tomlmodified+1 -0
@@ -150,6 +150,7 @@ dinit = []
150 150
151 [lints.clippy]151 [lints.clippy]
152 new_without_default = "allow"152 new_without_default = "allow"
153+collapsible_match = "allow"
153 154
154 [profile.release]155 [profile.release]
155 debug = "line-tables-only"156 debug = "line-tables-only"
src/ipc/client.rsmodified+1 -1
@@ -193,7 +193,7 @@ pub fn handle_msg(mut msg: Msg, json: bool) -> anyhow::Result<()> {
193 return Ok(());193 return Ok(());
194 }194 }
195 195
196- windows.sort_unstable_by(|a, b| a.id.cmp(&b.id));196+ windows.sort_unstable_by_key(|a| a.id);
197 197
198 for window in windows {198 for window in windows {
199 print_window(&window);199 print_window(&window);
src/layout/floating.rsmodified+1 -0
@@ -490,6 +490,7 @@ impl<W: LayoutElement> FloatingSpace<W> {
490 // Now, descendants is in back-to-front order, and repositioning them in the front-to-back490 // Now, descendants is in back-to-front order, and repositioning them in the front-to-back
491 // order will preserve the subsequent indices and work out right.491 // order will preserve the subsequent indices and work out right.
492 let mut idx = idx;492 let mut idx = idx;
493+ #[allow(clippy::explicit_counter_loop)]
493 for descendant_idx in descendants.into_iter().rev() {494 for descendant_idx in descendants.into_iter().rev() {
494 self.raise_window(descendant_idx, idx);495 self.raise_window(descendant_idx, idx);
495 idx += 1;496 idx += 1;