mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
Panel docking: the flyout grip test finds its grip with rfind
#9964's floating-group test took the last grip matching the tab's row with filter(..).last(), which clippy's -D warnings rejects on a double-ended iterator (double_ended_iterator_last, then filter_next_back), so main's gate failed at clippy on crates/ui-egui/src/panel_docking/tests.rs:1118. It now uses rfind, which returns the same grip.
This commit is contained in:
1 parent
3e9b4f735c
commit
0cc8be8eb3
1 file changed
+1
-2
@@ -1121,8 +1121,7 @@ fn a_group_dragged_out_of_the_icon_column_floats_expanded_and_its_tabs_switch()
|
||||
.filter(|(_, node)| node.label() == Some("Move tab group"))
|
||||
.filter_map(|(_, node)| node.bounds())
|
||||
.map(|b| Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32)))
|
||||
.filter(|grip| (grip.center().y - tab.center().y).abs() < 20.0)
|
||||
.last()
|
||||
.rfind(|grip| (grip.center().y - tab.center().y).abs() < 20.0)
|
||||
.expect("the flyout's grip");
|
||||
h.drag(grip.center(), h.canvas().center());
|
||||
h.frames(2);
|
||||
|
||||
Reference in new issue
Block a user