Switch from cargo +nighty fmt to the stable cargo fmt. Whatever edge-case formatting was happening with stable has been fixed

This commit is contained in:
Dustin Carlino 2021-05-14 08:39:51 -07:00
parent efd10ac9b0
commit 29c881ffc3
6 changed files with 12 additions and 16 deletions

View File

@ -242,9 +242,10 @@ fn dedupe_angles(pts: Vec<Pt2D>) -> Vec<Pt2D> {
let mut result: Vec<Pt2D> = Vec::new();
for pt in pts {
let l = result.len();
if l >= 2 && result[l - 2]
.angle_to(result[l - 1])
.approx_eq(result[l - 1].angle_to(pt), 0.1)
if l >= 2
&& result[l - 2]
.angle_to(result[l - 1])
.approx_eq(result[l - 1].angle_to(pt), 0.1)
{
result.pop();
}

View File

@ -359,7 +359,7 @@ impl State<App> for TimeWarpScreen {
return Transition::Pop;
}
_ => unreachable!(),
}
},
_ => {}
}
if self.panel.clicked_outside(ctx) {

View File

@ -272,7 +272,8 @@ pub fn dont_walk_icon(movement: &Movement, prerender: &Prerender) -> GeomBatch {
fn crosswalk_icon(geom: &PolyLine) -> (Pt2D, Angle) {
let l = Line::must_new(geom.points()[1], geom.points()[2]);
(
l.dist_along(Distance::meters(1.0)).unwrap_or_else(|| l.pt1()),
l.dist_along(Distance::meters(1.0))
.unwrap_or_else(|| l.pt1()),
l.angle().shortest_rotation_towards(Angle::degrees(90.0)),
)
}

View File

@ -529,11 +529,7 @@ fn modify_lanes(map: &mut Map, r: RoadID, lanes_ltr: Vec<LaneSpec>, effects: &mu
effects.changed_roads.insert(r);
let mut dummy_id_counter = 0;
let lanes_ltr = map.get_r(r).lane_specs(map);
let real_lane_ids = map
.get_r(r)
.lanes_ltr()
.into_iter()
.map(|(l, _, _)| l);
let real_lane_ids = map.get_r(r).lanes_ltr().into_iter().map(|(l, _, _)| l);
for (lane, id) in map
.get_r(r)
.create_lanes(lanes_ltr, &mut dummy_id_counter)

View File

@ -1,5 +0,0 @@
comment_width = 100
wrap_comments = true
format_strings = true
max_width = 100

View File

@ -620,7 +620,10 @@ impl<'b, 'a: 'b, 'c> ButtonBuilder<'a, 'c> {
.unwrap_or_else(|| ctx.style().text_fg_color);
let mut line = Line(text).fg(color);
if let Some(font_size) = label.font_size.or_else(|| default.and_then(|d| d.font_size)) {
if let Some(font_size) = label
.font_size
.or_else(|| default.and_then(|d| d.font_size))
{
line = line.size(font_size);
}