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 };