diff --git a/convert_osm/src/split_ways.rs b/convert_osm/src/split_ways.rs index f23d625b34..6f7f7ea305 100644 --- a/convert_osm/src/split_ways.rs +++ b/convert_osm/src/split_ways.rs @@ -242,9 +242,10 @@ fn dedupe_angles(pts: Vec) -> Vec { let mut result: Vec = 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(); } diff --git a/game/src/sandbox/time_warp.rs b/game/src/sandbox/time_warp.rs index b0433d9d52..79a585e935 100644 --- a/game/src/sandbox/time_warp.rs +++ b/game/src/sandbox/time_warp.rs @@ -359,7 +359,7 @@ impl State for TimeWarpScreen { return Transition::Pop; } _ => unreachable!(), - } + }, _ => {} } if self.panel.clicked_outside(ctx) { diff --git a/map_gui/src/render/traffic_signal.rs b/map_gui/src/render/traffic_signal.rs index 8c97ff9f5c..7ea283154a 100644 --- a/map_gui/src/render/traffic_signal.rs +++ b/map_gui/src/render/traffic_signal.rs @@ -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)), ) } diff --git a/map_model/src/edits/mod.rs b/map_model/src/edits/mod.rs index 9aa5b93b82..445af5a129 100644 --- a/map_model/src/edits/mod.rs +++ b/map_model/src/edits/mod.rs @@ -529,11 +529,7 @@ fn modify_lanes(map: &mut Map, r: RoadID, lanes_ltr: Vec, 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) diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index 8f132fa7ed..0000000000 --- a/rustfmt.toml +++ /dev/null @@ -1,5 +0,0 @@ -comment_width = 100 -wrap_comments = true - -format_strings = true -max_width = 100 diff --git a/widgetry/src/widgets/button.rs b/widgetry/src/widgets/button.rs index d6c0c4a6e0..fca573dbb1 100644 --- a/widgetry/src/widgets/button.rs +++ b/widgetry/src/widgets/button.rs @@ -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); }