From ffde86efa049dbdaf4ae4be3cd64c4c1c0f776f3 Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Wed, 27 Oct 2021 00:12:14 +0000 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/dependencies.yml | 16 ++++++++++++++++ Cargo.toml | 2 +- benches/Cargo.toml | 2 +- crates/bevy_app/Cargo.toml | 2 +- crates/bevy_asset/Cargo.toml | 2 +- crates/bevy_audio/Cargo.toml | 2 +- crates/bevy_core/Cargo.toml | 2 +- crates/bevy_derive/Cargo.toml | 2 +- crates/bevy_derive/src/enum_variant_meta.rs | 2 +- crates/bevy_derive/src/shader_defs.rs | 2 +- crates/bevy_diagnostic/Cargo.toml | 2 +- crates/bevy_dylib/Cargo.toml | 2 +- crates/bevy_dynamic_plugin/Cargo.toml | 2 +- crates/bevy_ecs/Cargo.toml | 2 +- crates/bevy_ecs/macros/Cargo.toml | 2 +- crates/bevy_ecs/macros/src/lib.rs | 6 +++--- crates/bevy_gilrs/Cargo.toml | 2 +- crates/bevy_gltf/Cargo.toml | 2 +- crates/bevy_input/Cargo.toml | 2 +- crates/bevy_internal/Cargo.toml | 2 +- crates/bevy_log/Cargo.toml | 2 +- crates/bevy_macro_utils/Cargo.toml | 2 +- crates/bevy_math/Cargo.toml | 2 +- crates/bevy_pbr/Cargo.toml | 2 +- crates/bevy_reflect/Cargo.toml | 2 +- .../bevy_reflect/bevy_reflect_derive/Cargo.toml | 2 +- .../bevy_reflect/bevy_reflect_derive/src/lib.rs | 16 ++++++++-------- crates/bevy_render/Cargo.toml | 2 +- crates/bevy_render/src/mesh/mesh/conversions.rs | 3 --- crates/bevy_render/src/render_graph/graph.rs | 1 - crates/bevy_render/src/texture/texture.rs | 2 -- crates/bevy_scene/Cargo.toml | 2 +- crates/bevy_sprite/Cargo.toml | 2 +- crates/bevy_tasks/Cargo.toml | 2 +- crates/bevy_text/Cargo.toml | 2 +- crates/bevy_transform/Cargo.toml | 2 +- crates/bevy_ui/Cargo.toml | 2 +- crates/bevy_utils/Cargo.toml | 2 +- crates/bevy_wgpu/Cargo.toml | 2 +- crates/bevy_window/Cargo.toml | 2 +- crates/bevy_window/src/lib.rs | 2 +- crates/bevy_winit/Cargo.toml | 2 +- examples/ios/Cargo.toml | 2 +- tools/ci/Cargo.toml | 2 +- 45 files changed, 71 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd06f47fab5fc..c451b0c28b536 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable - uses: actions/cache@v2 with: path: | @@ -255,6 +258,9 @@ jobs: if: always() steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev if: runner.os == 'linux' diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 078c643d6e953..619d2115a10a9 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -23,6 +23,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Install cargo-deny run: cargo install cargo-deny - name: Check for security advisories and unmaintained crates @@ -32,6 +36,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Install cargo-deny run: cargo install cargo-deny - name: Check for banned and duplicated dependencies @@ -41,6 +49,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Install cargo-deny run: cargo install cargo-deny - name: Check for unauthorized licenses @@ -50,6 +62,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Install cargo-deny run: cargo install cargo-deny - name: Checked for unauthorized crate sources diff --git a/Cargo.toml b/Cargo.toml index 51565942113cd..ff97fb1b45e27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy" version = "0.5.0" -edition = "2018" +edition = "2021" categories = ["game-engines", "graphics", "gui", "rendering"] description = "A refreshingly simple data-driven game engine and app framework" exclude = ["assets/**/*", "tools/**/*", ".github/**/*", "crates/**/*"] diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 500667f668bde..4626d6343d4d4 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "benches" version = "0.1.0" -edition = "2018" +edition = "2021" [dev-dependencies] criterion = "0.3" diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index 95a0bd6cf8217..a65d3435d1a94 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_app" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides core App functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml index 0c103c7610d6f..771421c968a67 100644 --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_asset" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides asset functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index fbad59c25a501..2e780270dbca0 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_audio" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides audio functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_core/Cargo.toml b/crates/bevy_core/Cargo.toml index 0843d2d49ee01..23786444980a8 100644 --- a/crates/bevy_core/Cargo.toml +++ b/crates/bevy_core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_core" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides core functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_derive/Cargo.toml b/crates/bevy_derive/Cargo.toml index af16371669dd2..ee774f0db9774 100644 --- a/crates/bevy_derive/Cargo.toml +++ b/crates/bevy_derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_derive" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides derive implementations for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_derive/src/enum_variant_meta.rs b/crates/bevy_derive/src/enum_variant_meta.rs index 66ed1f0ff7d2a..ae0c26d2ead33 100644 --- a/crates/bevy_derive/src/enum_variant_meta.rs +++ b/crates/bevy_derive/src/enum_variant_meta.rs @@ -21,7 +21,7 @@ pub fn derive_enum_variant_meta(input: TokenStream) -> TokenStream { let indices = 0..names.len(); TokenStream::from(quote! { - impl #impl_generics #bevy_util_path::EnumVariantMeta for #struct_name#ty_generics #where_clause { + impl #impl_generics #bevy_util_path::EnumVariantMeta for #struct_name #ty_generics #where_clause { fn enum_variant_index(&self) -> usize { match self { #(#struct_name::#idents {..} => #indices,)* diff --git a/crates/bevy_derive/src/shader_defs.rs b/crates/bevy_derive/src/shader_defs.rs index e9f91b6871fbb..41da09eb43e84 100644 --- a/crates/bevy_derive/src/shader_defs.rs +++ b/crates/bevy_derive/src/shader_defs.rs @@ -40,7 +40,7 @@ pub fn derive_shader_defs(input: TokenStream) -> TokenStream { let (impl_generics, ty_generics, _where_clause) = generics.split_for_impl(); TokenStream::from(quote! { - impl #impl_generics #bevy_render_path::shader::ShaderDefs for #struct_name#ty_generics { + impl #impl_generics #bevy_render_path::shader::ShaderDefs for #struct_name #ty_generics { fn shader_defs_len(&self) -> usize { #shader_defs_len } diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index b2e26c79f5187..fdbb909522c97 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_diagnostic" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides diagnostic functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_dylib/Cargo.toml b/crates/bevy_dylib/Cargo.toml index c1aa74ecd8910..6a12d11681840 100644 --- a/crates/bevy_dylib/Cargo.toml +++ b/crates/bevy_dylib/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_dylib" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Force the Bevy Engine to be dynamically linked for faster linking" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_dynamic_plugin/Cargo.toml b/crates/bevy_dynamic_plugin/Cargo.toml index e1b17258d3f44..4375790aadd56 100644 --- a/crates/bevy_dynamic_plugin/Cargo.toml +++ b/crates/bevy_dynamic_plugin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_dynamic_plugin" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides dynamic plugin loading capabilities for non-wasm platforms" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml index 9c39a46e62d1c..7332197560a70 100644 --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_ecs" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Bevy Engine's entity component system" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_ecs/macros/Cargo.toml b/crates/bevy_ecs/macros/Cargo.toml index 78f882dead7d4..69c988afa9481 100644 --- a/crates/bevy_ecs/macros/Cargo.toml +++ b/crates/bevy_ecs/macros/Cargo.toml @@ -2,7 +2,7 @@ name = "bevy_ecs_macros" version = "0.5.0" description = "Bevy ECS Macros" -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" [lib] diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs index e508c7ac2c6e5..5c5df5b7fc898 100644 --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -148,7 +148,7 @@ pub fn derive_bundle(input: TokenStream) -> TokenStream { TokenStream::from(quote! { /// SAFE: ComponentId is returned in field-definition-order. [from_components] and [get_components] use field-definition-order - unsafe impl #impl_generics #ecs_path::bundle::Bundle for #struct_name#ty_generics #where_clause { + unsafe impl #impl_generics #ecs_path::bundle::Bundle for #struct_name #ty_generics #where_clause { fn component_ids( components: &mut #ecs_path::component::Components, storages: &mut #ecs_path::storage::Storages, @@ -377,7 +377,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { let fetch_struct_visibility = &ast.vis; TokenStream::from(quote! { - impl #impl_generics #path::system::SystemParam for #struct_name#ty_generics #where_clause { + impl #impl_generics #path::system::SystemParam for #struct_name #ty_generics #where_clause { type Fetch = #fetch_struct_name <(#(<#field_types as #path::system::SystemParam>::Fetch,)*), #punctuated_generic_idents>; } @@ -410,7 +410,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { } impl #impl_generics #path::system::SystemParamFetch<'w, 's> for #fetch_struct_name <(#(<#field_types as #path::system::SystemParam>::Fetch,)*), #punctuated_generic_idents> { - type Item = #struct_name#ty_generics; + type Item = #struct_name #ty_generics; unsafe fn get_param( state: &'s mut Self, system_meta: &#path::system::SystemMeta, diff --git a/crates/bevy_gilrs/Cargo.toml b/crates/bevy_gilrs/Cargo.toml index 228dc6cee1d5c..b5bc1b6f65b44 100644 --- a/crates/bevy_gilrs/Cargo.toml +++ b/crates/bevy_gilrs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_gilrs" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Gamepad system made using Gilrs for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index b566d426c2781..850c031633ada 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_gltf" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Bevy Engine GLTF loading" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 1d2d9d0474400..718b3a6b38da6 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_input" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides input functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index f7b3f79f4b7a5..3ae9121fb7715 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_internal" version = "0.5.0" -edition = "2018" +edition = "2021" description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic' feature" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_log/Cargo.toml b/crates/bevy_log/Cargo.toml index 42dcf98a88bc5..eafa77e51b4d5 100644 --- a/crates/bevy_log/Cargo.toml +++ b/crates/bevy_log/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_log" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides logging for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_macro_utils/Cargo.toml b/crates/bevy_macro_utils/Cargo.toml index fa930d4aae883..2845405e2f89b 100644 --- a/crates/bevy_macro_utils/Cargo.toml +++ b/crates/bevy_macro_utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_macro_utils" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A collection of utils for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 5d6de28efb67f..f998039ba1864 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_math" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides math functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index a1b8afb9d54a8..b978fcf2fa4b6 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_pbr" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Adds PBR rendering to Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index 263b0ade6b37f..2e9af8f073f44 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_reflect" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Dynamically interact with rust types" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml index 0816fb5b918e2..294cc155bc80f 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml +++ b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_reflect_derive" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Derive implementations for bevy_reflect" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs index 01a4ed6e598d7..45d40b0ff0a58 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -206,7 +206,7 @@ fn impl_struct( TokenStream::from(quote! { #get_type_registration_impl - impl #impl_generics #bevy_reflect_path::Struct for #struct_name#ty_generics #where_clause { + impl #impl_generics #bevy_reflect_path::Struct for #struct_name #ty_generics #where_clause { fn field(&self, name: &str) -> Option<&dyn #bevy_reflect_path::Reflect> { match name { #(#field_names => Some(&self.#field_idents),)* @@ -259,7 +259,7 @@ fn impl_struct( } // SAFE: any and any_mut both return self - unsafe impl #impl_generics #bevy_reflect_path::Reflect for #struct_name#ty_generics #where_clause { + unsafe impl #impl_generics #bevy_reflect_path::Reflect for #struct_name #ty_generics #where_clause { #[inline] fn type_name(&self) -> &str { std::any::type_name::() @@ -349,7 +349,7 @@ fn impl_tuple_struct( TokenStream::from(quote! { #get_type_registration_impl - impl #impl_generics #bevy_reflect_path::TupleStruct for #struct_name#ty_generics { + impl #impl_generics #bevy_reflect_path::TupleStruct for #struct_name #ty_generics { fn field(&self, index: usize) -> Option<&dyn #bevy_reflect_path::Reflect> { match index { #(#field_indices => Some(&self.#field_idents),)* @@ -381,7 +381,7 @@ fn impl_tuple_struct( } // SAFE: any and any_mut both return self - unsafe impl #impl_generics #bevy_reflect_path::Reflect for #struct_name#ty_generics { + unsafe impl #impl_generics #bevy_reflect_path::Reflect for #struct_name #ty_generics { #[inline] fn type_name(&self) -> &str { std::any::type_name::() @@ -457,7 +457,7 @@ fn impl_value( #get_type_registration_impl // SAFE: any and any_mut both return self - unsafe impl #impl_generics #bevy_reflect_path::Reflect for #type_name#ty_generics #where_clause { + unsafe impl #impl_generics #bevy_reflect_path::Reflect for #type_name #ty_generics #where_clause { #[inline] fn type_name(&self) -> &str { std::any::type_name::() @@ -715,10 +715,10 @@ fn impl_get_type_registration( let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); quote! { #[allow(unused_mut)] - impl #impl_generics #bevy_reflect_path::GetTypeRegistration for #type_name#ty_generics #where_clause { + impl #impl_generics #bevy_reflect_path::GetTypeRegistration for #type_name #ty_generics #where_clause { fn get_type_registration() -> #bevy_reflect_path::TypeRegistration { - let mut registration = #bevy_reflect_path::TypeRegistration::of::<#type_name#ty_generics>(); - #(registration.insert::<#registration_data>(#bevy_reflect_path::FromType::<#type_name#ty_generics>::from_type());)* + let mut registration = #bevy_reflect_path::TypeRegistration::of::<#type_name #ty_generics>(); + #(registration.insert::<#registration_data>(#bevy_reflect_path::FromType::<#type_name #ty_generics>::from_type());)* registration } } diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index dcb4ba4320bfd..6dbad550a95fb 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_render" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides rendering functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_render/src/mesh/mesh/conversions.rs b/crates/bevy_render/src/mesh/mesh/conversions.rs index 51170afc2b22e..e62932c8c1b96 100644 --- a/crates/bevy_render/src/mesh/mesh/conversions.rs +++ b/crates/bevy_render/src/mesh/mesh/conversions.rs @@ -5,7 +5,6 @@ //! //! ```rust //! use bevy_render::mesh::VertexAttributeValues; -//! use std::convert::{ TryInto, TryFrom }; //! //! // creating std::vec::Vec //! let buffer = vec![[0_u32; 4]; 10]; @@ -27,7 +26,6 @@ use crate::mesh::VertexAttributeValues; use bevy_utils::EnumVariantMeta; -use std::convert::TryFrom; use thiserror::Error; #[derive(Debug, Clone, Error)] @@ -357,7 +355,6 @@ impl TryFrom for Vec { #[cfg(test)] mod tests { use super::VertexAttributeValues; - use std::convert::{TryFrom, TryInto}; #[test] fn f32() { let buffer = vec![0.0; 10]; diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs index 503bce7578e09..b820877818110 100644 --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -308,7 +308,6 @@ mod tests { }; use bevy_ecs::world::World; use bevy_utils::HashSet; - use std::iter::FromIterator; #[derive(Debug)] struct TestNode { diff --git a/crates/bevy_render/src/texture/texture.rs b/crates/bevy_render/src/texture/texture.rs index 2a349a0fd0770..6ef80ed4cf4d2 100644 --- a/crates/bevy_render/src/texture/texture.rs +++ b/crates/bevy_render/src/texture/texture.rs @@ -1,5 +1,3 @@ -use std::convert::TryInto; - use super::{Extent3d, SamplerDescriptor, TextureDescriptor, TextureDimension, TextureFormat}; use crate::renderer::{ RenderResource, RenderResourceContext, RenderResourceId, RenderResourceType, diff --git a/crates/bevy_scene/Cargo.toml b/crates/bevy_scene/Cargo.toml index 8111ab14bb33d..8b39b191a86e0 100644 --- a/crates/bevy_scene/Cargo.toml +++ b/crates/bevy_scene/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_scene" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides scene functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_sprite/Cargo.toml b/crates/bevy_sprite/Cargo.toml index 4c47f9457a512..4b1097c8ee153 100644 --- a/crates/bevy_sprite/Cargo.toml +++ b/crates/bevy_sprite/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_sprite" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides sprite functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_tasks/Cargo.toml b/crates/bevy_tasks/Cargo.toml index 0d54f41cf380e..c40468c6bfe4a 100644 --- a/crates/bevy_tasks/Cargo.toml +++ b/crates/bevy_tasks/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_tasks" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A task executor for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index f4be2c9a855db..613e50f93be40 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_text" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides text functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_transform/Cargo.toml b/crates/bevy_transform/Cargo.toml index 5b22b660aac40..1efb017beb521 100644 --- a/crates/bevy_transform/Cargo.toml +++ b/crates/bevy_transform/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_transform" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides hierarchy and transform functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index 5a78ef4ee2055..ab2f886e814e9 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_ui" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A custom ECS-driven UI framework built specifically for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_utils/Cargo.toml b/crates/bevy_utils/Cargo.toml index ff7b66065dec4..4289f4afca5ce 100644 --- a/crates/bevy_utils/Cargo.toml +++ b/crates/bevy_utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_utils" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A collection of utils for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_wgpu/Cargo.toml b/crates/bevy_wgpu/Cargo.toml index 2b1c1823d0844..ad9dc720190cf 100644 --- a/crates/bevy_wgpu/Cargo.toml +++ b/crates/bevy_wgpu/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_wgpu" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A wgpu render backend for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_window/Cargo.toml b/crates/bevy_window/Cargo.toml index 807e3f969ab81..bbb8f5880e8a2 100644 --- a/crates/bevy_window/Cargo.toml +++ b/crates/bevy_window/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_window" version = "0.5.0" -edition = "2018" +edition = "2021" description = "Provides windowing functionality for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/crates/bevy_window/src/lib.rs b/crates/bevy_window/src/lib.rs index 79299dd9d0af1..00b26de361247 100644 --- a/crates/bevy_window/src/lib.rs +++ b/crates/bevy_window/src/lib.rs @@ -55,7 +55,7 @@ impl Plugin for WindowPlugin { .world .get_resource::() .map(|descriptor| (*descriptor).clone()) - .unwrap_or_else(WindowDescriptor::default); + .unwrap_or_default(); let mut create_window_event = app .world .get_resource_mut::>() diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 3b8c56af12645..a531e4168008c 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_winit" version = "0.5.0" -edition = "2018" +edition = "2021" description = "A winit window and input backend for Bevy Engine" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" diff --git a/examples/ios/Cargo.toml b/examples/ios/Cargo.toml index 06a9baa5839c0..8159df555ecdd 100644 --- a/examples/ios/Cargo.toml +++ b/examples/ios/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy-ios-example" version = "0.1.0" -edition = "2018" +edition = "2021" [lib] name = "bevy_ios_example" diff --git a/tools/ci/Cargo.toml b/tools/ci/Cargo.toml index 5155102f959ff..8cf9645806989 100644 --- a/tools/ci/Cargo.toml +++ b/tools/ci/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ci" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html