From 5abaa7360e97ccaa5db9f99f63a2efaa8a634ebf Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 03:42:06 -0500 Subject: [PATCH] fw sync: clippy clean over the merged sync (all targets, all features) Real fixes, no allows: split long functions (portal first reads, canvas wheel read, text editor input pass, list row toggle parts, notice action rows, thumbnails grid aspect and edit rules, comments row entries), boxed the large Entry item row, type aliases for complex types, a StatusMeasure for the status cell's measures, double #[must_use] removed where the type is #[must_use], Copy clones and useless conversions dropped, struct-update syntax in place of field reassignment, a split press-pass test. --- crates/behavior/src/press.rs | 13 +- crates/color-ui/src/ui/palette.rs | 2 - crates/pages/src/ui/thumbnails.rs | 59 +++++---- crates/pages/src/ui/view.rs | 19 ++- crates/pages/tests/it/thumbnails.rs | 5 +- crates/pages/tests/it/views.rs | 11 +- crates/platform/src/appearance/portal.rs | 32 +++-- crates/print/tests/it/dialog.rs | 2 +- crates/review/src/signature.rs | 2 +- crates/review/src/ui/comments.rs | 108 ++++++++++------- crates/review/src/ui/thread/note_popup.rs | 5 - crates/review/src/ui/thread/popover.rs | 10 +- crates/review/tests/it/annotate.rs | 24 ++-- crates/review/tests/it/comments.rs | 10 +- crates/review/tests/it/signature.rs | 8 +- crates/text/src/ui/editor.rs | 112 ++++++++++-------- crates/ui-canvas/src/canvas/mod.rs | 81 ++++++++----- .../ui-canvas/src/canvas/navigate/stories.rs | 3 +- crates/ui-canvas/src/canvas/split/mod.rs | 5 +- crates/ui-contract/src/contract/entry.rs | 9 +- .../src/contract/steps/scroll_owner.rs | 5 +- crates/ui-contract/tests/it/drag/mod.rs | 5 +- .../src/patterns/form_dialogs/form.rs | 1 - .../src/patterns/form_dialogs/param.rs | 2 +- .../src/patterns/form_dialogs/password.rs | 4 - crates/ui-shell/src/shell/start.rs | 7 +- crates/ui-shell/tests/it/shell/start.rs | 7 +- crates/ui-widgets/src/display/picture.rs | 4 +- crates/ui-widgets/src/list/row/paint.rs | 12 +- crates/ui-widgets/src/list/row/placement.rs | 20 ++-- crates/ui-widgets/src/list/row/show.rs | 88 ++++++++------ crates/ui-widgets/src/list/view.rs | 5 +- crates/ui-widgets/src/notices/notice.rs | 29 +++-- crates/ui-widgets/src/tile_grid/grid.rs | 6 +- .../ui-widgets/tests/it/text/rtl_paragraph.rs | 5 +- 35 files changed, 411 insertions(+), 309 deletions(-) diff --git a/crates/behavior/src/press.rs b/crates/behavior/src/press.rs index cf4f8fb235..7daf3c078f 100644 --- a/crates/behavior/src/press.rs +++ b/crates/behavior/src/press.rs @@ -1004,9 +1004,13 @@ mod tests { assert_eq!(end.target, Some(2)); assert!(matches!(end.phase, Some(PressPhase::Release { click: false, .. })), "{:?}", end.phase); assert_eq!(end.activated, None, "a passed press is no click"); + } - // The move past slop came in the press's own pass: the shape below gets the Down, its DragStart next pass, - // and a release in between waits for it. + /// The move past slop came in the press's own pass: the shape below gets the Down, its DragStart next pass, and a + /// release in between waits for it. + #[test] + fn a_drag_past_slop_in_the_press_pass_hands_the_down_over() { + let origin = pos2(0.0, 0.0); let mut machine = PressMachine::new(); let first = passing_pass(&mut machine, &[press(0.0, 1.0), moved(40.0)]); assert!(matches!(first.phase, Some(PressPhase::Down { .. })) && first.passes.is_some(), "{first:?}"); @@ -1020,8 +1024,11 @@ mod tests { let end = passing_pass(&mut machine, &[]); assert_eq!(end.target, Some(2)); assert!(matches!(end.phase, Some(PressPhase::Release { click: false, .. })), "{:?}", end.phase); + } - // No shape took the passed press: it is abandoned, and its release is no click. + /// No shape took the passed press: it is abandoned, and its release is no click. + #[test] + fn a_passed_press_no_shape_takes_is_abandoned() { let mut machine = PressMachine::new(); let _ = passing_pass(&mut machine, &[press(0.0, 1.0)]); assert!(passing_pass(&mut machine, &[moved(40.0)]).passes.is_some()); diff --git a/crates/color-ui/src/ui/palette.rs b/crates/color-ui/src/ui/palette.rs index 9b564a15a7..717b7fd81e 100644 --- a/crates/color-ui/src/ui/palette.rs +++ b/crates/color-ui/src/ui/palette.rs @@ -129,14 +129,12 @@ impl<'a> SwatchPalette<'a> { /// An Other… cell after the swatches, named `label`: activating it files a `ColorRequest` keyed `key` at the bound /// colour as `pick_color`, for the host's own picker, and sets nothing. - #[must_use] pub fn other(mut self, key: impl Into, label: impl Into