Format with rustfmt 1.4.38-stable.
Rename 'pair1' to 'pair'.
@@ -160,7 +160,10 @@ impl DrawIntersection {
if let Some(ring) = i.polygon.get_outer_ring() {
// Turn each road into the left and right point that should be on the ring, so we can
// "subtract" them out.
- let road_pairs = i.roads.iter().map(|r| {
+ let road_pairs = i
+ .roads
+ .iter()
+ .map(|r| {
let road = map.get_r(*r);
let half_width = road.get_half_width();
let left = road.center_pts.must_shift_left(half_width);
@@ -170,7 +173,8 @@ impl DrawIntersection {
} else {
(left.last_pt(), right.last_pt())
}
- }).collect::<Vec<_>>();
+ })
+ .collect::<Vec<_>>();
// Walk along each line segment on the ring. If it's not one of our road pairs, add it
// as a potential segment.
@@ -181,7 +185,7 @@ impl DrawIntersection {
.iter()
.any(|road_pair| approx_eq(window, &road_pair))
})
- .map(|pair1| PolyLine::must_new(vec![pair1[0], pair1[1]]))
+ .map(|pair| PolyLine::must_new(vec![pair[0], pair[1]]))
.collect::<Vec<_>>()
// TODO We could merge adjacent segments, to get nicer corners
