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 = []
150150
151151 [lints.clippy]
152152 new_without_default = "allow"
153+collapsible_match = "allow"
153154
154155 [profile.release]
155156 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<()> {
193193 return Ok(());
194194 }
195195
196- windows.sort_unstable_by(|a, b| a.id.cmp(&b.id));
196+ windows.sort_unstable_by_key(|a| a.id);
197197
198198 for window in windows {
199199 print_window(&window);
src/layout/floating.rsmodified+1 -0
@@ -490,6 +490,7 @@ impl<W: LayoutElement> FloatingSpace<W> {
490490 // Now, descendants is in back-to-front order, and repositioning them in the front-to-back
491491 // order will preserve the subsequent indices and work out right.
492492 let mut idx = idx;
493+ #[allow(clippy::explicit_counter_loop)]
493494 for descendant_idx in descendants.into_iter().rev() {
494495 self.raise_window(descendant_idx, idx);
495496 idx += 1;