Skip to content

Commit ffde86e

Browse files
committed
Update to edition 2021 on master (#3028)
Objective During work on #3009 I've found that not all jobs use actions-rs, and therefore, an previous version of Rust is used for them. So while compilation and other stuff can pass, checking markup and Android build may fail with compilation errors. Solution This PR adds `action-rs` for any job running cargo, and updates the edition to 2021.
1 parent 6a8a8c9 commit ffde86e

File tree

45 files changed

+71
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+71
-55
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ jobs:
125125
runs-on: ubuntu-latest
126126
steps:
127127
- uses: actions/checkout@v2
128+
- uses: actions-rs/toolchain@v1
129+
with:
130+
toolchain: stable
128131
- uses: actions/cache@v2
129132
with:
130133
path: |
@@ -255,6 +258,9 @@ jobs:
255258
if: always()
256259
steps:
257260
- uses: actions/checkout@v2
261+
- uses: actions-rs/toolchain@v1
262+
with:
263+
toolchain: stable
258264
- name: Install alsa and udev
259265
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
260266
if: runner.os == 'linux'

.github/workflows/dependencies.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v2
26+
- uses: actions-rs/toolchain@v1
27+
with:
28+
toolchain: stable
29+
override: true
2630
- name: Install cargo-deny
2731
run: cargo install cargo-deny
2832
- name: Check for security advisories and unmaintained crates
@@ -32,6 +36,10 @@ jobs:
3236
runs-on: ubuntu-latest
3337
steps:
3438
- uses: actions/checkout@v2
39+
- uses: actions-rs/toolchain@v1
40+
with:
41+
toolchain: stable
42+
override: true
3543
- name: Install cargo-deny
3644
run: cargo install cargo-deny
3745
- name: Check for banned and duplicated dependencies
@@ -41,6 +49,10 @@ jobs:
4149
runs-on: ubuntu-latest
4250
steps:
4351
- uses: actions/checkout@v2
52+
- uses: actions-rs/toolchain@v1
53+
with:
54+
toolchain: stable
55+
override: true
4456
- name: Install cargo-deny
4557
run: cargo install cargo-deny
4658
- name: Check for unauthorized licenses
@@ -50,6 +62,10 @@ jobs:
5062
runs-on: ubuntu-latest
5163
steps:
5264
- uses: actions/checkout@v2
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
toolchain: stable
68+
override: true
5369
- name: Install cargo-deny
5470
run: cargo install cargo-deny
5571
- name: Checked for unauthorized crate sources

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
categories = ["game-engines", "graphics", "gui", "rendering"]
66
description = "A refreshingly simple data-driven game engine and app framework"
77
exclude = ["assets/**/*", "tools/**/*", ".github/**/*", "crates/**/*"]

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "benches"
33
version = "0.1.0"
4-
edition = "2018"
4+
edition = "2021"
55

66
[dev-dependencies]
77
criterion = "0.3"

crates/bevy_app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy_app"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
description = "Provides core App functionality for Bevy Engine"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"

crates/bevy_asset/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy_asset"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
description = "Provides asset functionality for Bevy Engine"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"

crates/bevy_audio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy_audio"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
description = "Provides audio functionality for Bevy Engine"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"

crates/bevy_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy_core"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
description = "Provides core functionality for Bevy Engine"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"

crates/bevy_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bevy_derive"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
description = "Provides derive implementations for Bevy Engine"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"

crates/bevy_derive/src/enum_variant_meta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn derive_enum_variant_meta(input: TokenStream) -> TokenStream {
2121
let indices = 0..names.len();
2222

2323
TokenStream::from(quote! {
24-
impl #impl_generics #bevy_util_path::EnumVariantMeta for #struct_name#ty_generics #where_clause {
24+
impl #impl_generics #bevy_util_path::EnumVariantMeta for #struct_name #ty_generics #where_clause {
2525
fn enum_variant_index(&self) -> usize {
2626
match self {
2727
#(#struct_name::#idents {..} => #indices,)*

0 commit comments

Comments
 (0)