Skip to content

Commit

Permalink
Upgrade to rust 1.56 and cutover to rust edition 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Oct 21, 2021
1 parent 49b2e67 commit 9f86365
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: hecrj/setup-rust-action@v1
with:
rust-version: 1.54.0
rust-version: 1.56.0

- name: Cache build
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion abstio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "abstio"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstutil = { path = "../abstutil" }
Expand Down
2 changes: 1 addition & 1 deletion abstutil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "abstutil"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
anyhow = "1.0.38"
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cli"
version = "0.1.0"
edition = "2018"
edition = "2021"

[dependencies]
aabb-quadtree = "0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion collisions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "collisions"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
geom = { path = "../geom" }
Expand Down
2 changes: 1 addition & 1 deletion convert_osm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "convert_osm"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion fifteen_min/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "fifteen_min"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion game/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "game"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"
description = "A traffic simulation game based on OpenStreetMap"
repository = "https://github.com/a-b-street/abstreet"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion geom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "geom"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
aabb-quadtree = "0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion headless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "headless"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion importer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "importer"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion kml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "kml"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion map_editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "map_editor"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion map_gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "map_gui"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
native = ["clipboard", "subprocess", "tokio", "widgetry/native-backend"]
Expand Down
4 changes: 2 additions & 2 deletions map_gui/src/tools/city_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ impl<A: AppLike + 'static> CitiesInCountryPicker<A> {
.small_heading()
.into_widget(ctx)
.margin_right(20)];
row.extend(buttons.drain(..));
row.append(&mut buttons);
col.push(
Widget::custom_row(row).flex_wrap_no_inner_spacing(ctx, Percent::int(70)),
);
Expand All @@ -396,7 +396,7 @@ impl<A: AppLike + 'static> CitiesInCountryPicker<A> {
.small_heading()
.into_widget(ctx)
.margin_right(20)];
row.extend(buttons.drain(..));
row.append(&mut buttons);
col.push(Widget::custom_row(row).flex_wrap_no_inner_spacing(ctx, Percent::int(70)));
}

Expand Down
2 changes: 1 addition & 1 deletion map_model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "map_model"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion osm_viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "osm_viewer"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion parking_mapper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "parking_mapper"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
default = ["map_gui/native", "reqwest", "widgetry/native-backend"]
Expand Down
2 changes: 1 addition & 1 deletion popdat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "popdat"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstutil = { path = "../abstutil" }
Expand Down
2 changes: 1 addition & 1 deletion santa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "santa"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion sim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sim"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tests"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion traffic_seitan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "traffic_seitan"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstutil = { path = "../abstutil" }
Expand Down
2 changes: 1 addition & 1 deletion traffic_signal_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "traffic_signal_data"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
include_dir = { git = "https://github.com/dabreegster/include_dir", branch = "union" }
Expand Down
2 changes: 1 addition & 1 deletion updater/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "updater"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
abstio = { path = "../abstio" }
Expand Down
2 changes: 1 addition & 1 deletion widgetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "widgetry"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
native-backend = ["glutin", "usvg/system-fonts", "usvg/text"]
Expand Down
3 changes: 1 addition & 2 deletions widgetry/src/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,8 @@ impl Widget {

// Populate a flattened list of Nodes, matching the traversal order
fn get_flexbox(&self, parent: Node, stretch: &mut Stretch, nodes: &mut Vec<Node>) {
let mut style = self.layout.style;
if let Some(container) = self.widget.downcast_ref::<Container>() {
let mut style = self.layout.style;
style.flex_direction = if container.is_row {
FlexDirection::Row
} else {
Expand All @@ -579,7 +579,6 @@ impl Widget {
}
stretch.add_child(parent, node).unwrap();
} else {
let mut style = self.layout.style;
style.size = Size {
width: Dimension::Points(self.widget.get_dims().width as f32),
height: Dimension::Points(self.widget.get_dims().height as f32),
Expand Down
2 changes: 1 addition & 1 deletion widgetry_demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "widgetry_demo"
version = "0.1.0"
authors = ["Dustin Carlino <[email protected]>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down

0 comments on commit 9f86365

Please sign in to comment.