diff --git a/core/dr-pipeline/src/orphan.rs b/core/dr-pipeline/src/orphan.rs index 4d95264..79ae06f 100644 --- a/core/dr-pipeline/src/orphan.rs +++ b/core/dr-pipeline/src/orphan.rs @@ -302,7 +302,10 @@ fn part_values<'r>( fn brush_values(strokes: &[Stroke], source: (u32, u32)) -> Vec { // Into units of the shorter edge, as `to_square` does, so a dab is round. let short = source.0.min(source.1).max(1) as f32; - let scale = (source.0.max(1) as f32 / short, source.1.max(1) as f32 / short); + let scale = ( + source.0.max(1) as f32 / short, + source.1.max(1) as f32 / short, + ); let square = |p: (f32, f32)| (p.0 * scale.0, p.1 * scale.1); let cells: Vec<(f32, f32)> = lattice().map(square).collect(); @@ -314,7 +317,12 @@ fn brush_values(strokes: &[Stroke], source: (u32, u32)) -> Vec { // Only cells inside the stroke's bounding box can be reached. let (lo, hi) = points.iter().fold( ((f32::MAX, f32::MAX), (f32::MIN, f32::MIN)), - |(lo, hi), p| ((lo.0.min(p.0), lo.1.min(p.1)), (hi.0.max(p.0), hi.1.max(p.1))), + |(lo, hi), p| { + ( + (lo.0.min(p.0), lo.1.min(p.1)), + (hi.0.max(p.0), hi.1.max(p.1)), + ) + }, ); for (cell, dst) in cells.iter().zip(out.iter_mut()) { if cell.0 < lo.0 - r || cell.0 > hi.0 + r || cell.1 < lo.1 - r || cell.1 > hi.1 + r {