mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Fill: name the Random Fill path segment type for clippy (#17431)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
5b860fe375
commit
dc26febbc2
1 file changed
+4
-1
@@ -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<Segment> {
|
||||
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 };
|
||||
|
||||
Reference in new issue
Block a user