From dc26febbc24e31bd75465953086317fa1d5e537a Mon Sep 17 00:00:00 2001 From: David Mann Date: Mon, 30 Nov 2026 20:32:50 +0100 Subject: [PATCH] Fill: name the Random Fill path segment type for clippy (#17431) Co-Authored-By: Claude Opus 5.5 --- crates/compose/src/scripted_pattern.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/compose/src/scripted_pattern.rs b/crates/compose/src/scripted_pattern.rs index 9a5ae9ddc0..58fe9750d8 100644 --- a/crates/compose/src/scripted_pattern.rs +++ b/crates/compose/src/scripted_pattern.rs @@ -353,8 +353,11 @@ struct Placed { angle: f64, } +/// One straight piece of a path: its start, its end and its length. +type Segment = ((f64, f64), (f64, f64), f64); + /// The straight pieces of `lines` with their lengths, closed lines closing back to their start. -fn segments(lines: &[Polyline]) -> Vec<((f64, f64), (f64, f64), f64)> { +fn segments(lines: &[Polyline]) -> Vec { let mut out = Vec::new(); for line in lines { let closing = if line.closed { line.pts.last().zip(line.pts.first()).map(|(a, b)| (*a, *b)) } else { None };