Update for edition 2021 (#2997)
# Objective - update for Edition 2021 ## Solution - remove the `resolver = "2"` - update for https://doc.rust-lang.org/edition-guide/rust-2021/reserving-syntax.html by adding a few ` `
This commit is contained in:
parent
432ce72faf
commit
2f4bcc5bf7
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -71,6 +71,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Install Android targets
|
||||
run: rustup target add aarch64-linux-android armv7-linux-androideabi
|
||||
- name: Install Cargo APK
|
||||
@ -145,6 +149,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- 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'
|
||||
|
16
.github/workflows/dependencies.yml
vendored
16
.github/workflows/dependencies.yml
vendored
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
@ -14,7 +14,6 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/bevyengine/bevy"
|
||||
resolver = "2"
|
||||
|
||||
[workspace]
|
||||
exclude = ["benches"]
|
||||
|
@ -5,7 +5,7 @@ authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_app"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_asset"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_audio"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_core"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -43,7 +43,7 @@ impl Plugin for CorePlugin {
|
||||
app.world
|
||||
.get_resource::<DefaultTaskPoolOptions>()
|
||||
.cloned()
|
||||
.unwrap_or_else(DefaultTaskPoolOptions::default)
|
||||
.unwrap_or_default()
|
||||
.create_default_pools(&mut app.world);
|
||||
|
||||
app.init_resource::<Time>()
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_derive"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_diagnostic"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_dylib"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -5,7 +5,7 @@ authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "Provides dynamic plugin loading capabilities for non-wasm platforms"
|
||||
homepage = "https://bevyengine.org"
|
||||
repository = "https://github.com/bevyengine/bevy"
|
||||
|
@ -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"
|
||||
|
@ -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]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_gilrs"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = ["Bevy Contributors <bevyengine@gmail.com>", "Carter Anderson <mcanders1@gmail.com>"]
|
||||
description = "Gamepad system made using Gilrs for Bevy Engine"
|
||||
homepage = "https://bevyengine.org"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_gltf"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_input"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_internal"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_log"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_macro_utils"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_math"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_pbr"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_reflect"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_reflect_derive"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -557,9 +557,7 @@ pub fn impl_reflect_value(input: TokenStream) -> TokenStream {
|
||||
|
||||
let bevy_reflect_path = BevyManifest::default().get_path("bevy_reflect");
|
||||
let ty = &reflect_value_def.type_name;
|
||||
let reflect_attrs = reflect_value_def
|
||||
.attrs
|
||||
.unwrap_or_else(ReflectAttrs::default);
|
||||
let reflect_attrs = reflect_value_def.attrs.unwrap_or_default();
|
||||
let registration_data = &reflect_attrs.data;
|
||||
let get_type_registration_impl = impl_get_type_registration(
|
||||
ty,
|
||||
|
@ -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"
|
||||
|
@ -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<VertexAttributeValues> for Vec<f32> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::VertexAttributeValues;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
#[test]
|
||||
fn f32() {
|
||||
let buffer = vec![0.0; 10];
|
||||
|
@ -308,7 +308,6 @@ mod tests {
|
||||
};
|
||||
use bevy_ecs::world::World;
|
||||
use bevy_utils::HashSet;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TestNode {
|
||||
|
@ -1,4 +1,3 @@
|
||||
use std::convert::TryFrom;
|
||||
use thiserror::Error;
|
||||
|
||||
use super::{Extent3d, Texture, TextureDimension, TextureFormat};
|
||||
|
@ -1,5 +1,3 @@
|
||||
use std::convert::TryInto;
|
||||
|
||||
use super::{Extent3d, SamplerDescriptor, TextureDescriptor, TextureDimension, TextureFormat};
|
||||
use crate::renderer::{
|
||||
RenderResource, RenderResourceContext, RenderResourceId, RenderResourceType,
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_scene"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_sprite"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_tasks"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Lachlan Sneff <lachlan.sneff@gmail.com>",
|
||||
|
@ -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"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_transform"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -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"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_utils"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_wgpu"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -119,7 +119,7 @@ pub fn get_wgpu_render_system(world: &mut World) -> impl FnMut(&mut World) {
|
||||
let options = world
|
||||
.get_resource::<WgpuOptions>()
|
||||
.cloned()
|
||||
.unwrap_or_else(WgpuOptions::default);
|
||||
.unwrap_or_default();
|
||||
let mut wgpu_renderer = future::block_on(WgpuRenderer::new(options));
|
||||
|
||||
let resource_context = WgpuRenderResourceContext::new(wgpu_renderer.device.clone());
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_window"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -58,7 +58,7 @@ impl Plugin for WindowPlugin {
|
||||
.world
|
||||
.get_resource::<WindowDescriptor>()
|
||||
.map(|descriptor| (*descriptor).clone())
|
||||
.unwrap_or_else(WindowDescriptor::default);
|
||||
.unwrap_or_default();
|
||||
let mut create_window_event = app
|
||||
.world
|
||||
.get_resource_mut::<Events<CreateWindow>>()
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_winit"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy-ios-example"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "bevy_ios_example"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_core_pipeline"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_gltf2"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_pbr2"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_render2"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -5,7 +5,6 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! use bevy_render2::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<VertexAttributeValues> for Vec<f32> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::VertexAttributeValues;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
#[test]
|
||||
fn f32() {
|
||||
let buffer = vec![0.0; 10];
|
||||
|
@ -364,7 +364,6 @@ mod tests {
|
||||
};
|
||||
use bevy_ecs::world::World;
|
||||
use bevy_utils::HashSet;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TestNode {
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bevy_sprite2"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Carter Anderson <mcanders1@gmail.com>",
|
||||
|
@ -5,7 +5,7 @@ authors = [
|
||||
"Bevy Contributors <bevyengine@gmail.com>",
|
||||
"Nathan Stocks <nathan@agileperception.com>"
|
||||
]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user