Skip to content

Commit

Permalink
Update bevy to 0.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MinerSebas committed Feb 8, 2024
1 parent 6bc7073 commit 33ad89d
Show file tree
Hide file tree
Showing 22 changed files with 374 additions and 1,966 deletions.
1,139 changes: 156 additions & 983 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ itertools = "0.12.1"

[dev-dependencies]
dylint_testing = "2.6.1"
bevy = { version = "0.8.1", default-features = false }
bevy = { version = "0.12.1", default-features = false }

[package.metadata.rust-analyzer]
rustc_private = true
Expand All @@ -33,14 +33,6 @@ path = "ui/app_lints/insert_resource_with_default.rs"
name = "bundle_with_incomplete_transforms"
path = "ui/bundle_lints/bundle_with_incomplete_transforms.rs"

[[example]]
name = "multiple_labels_on_type"
path = "ui/label_lints/multiple_labels_on_type.rs"

[[example]]
name = "str_label"
path = "ui/label_lints/str_label.rs"

[[example]]
name = "empty_query"
path = "ui/system_lints/empty_query.rs"
Expand Down
6 changes: 4 additions & 2 deletions src/app_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ declare_lint! {
/// **Example:**
/// ```rust
/// # use bevy::app::App;
/// #[derive(Default)]
/// # use bevy::ecs::system::Resource;
/// #[derive(Default, Resource)]
/// struct MyResource;
///
/// App::new().insert_resource(MyResource::default());
/// ```
/// Is better expressed with:
/// ```rust
/// # use bevy::app::App;
/// #[derive(Default)]
/// # use bevy::ecs::system::Resource;
/// #[derive(Default, Resource)]
/// struct MyResource;
///
/// App::new().init_resource::<MyResource>();
Expand Down
6 changes: 0 additions & 6 deletions src/bevy_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ pub const QUERY: &[&str; 4] = &["bevy_ecs", "system", "query", "Query"];
pub const SYSTEM_PARAM: &[&str; 4] = &["bevy_ecs", "system", "system_param", "SystemParam"];
pub const BUNDLE: &[&str; 3] = &["bevy_ecs", "bundle", "Bundle"];

pub const APP_LABEL: &[&str; 3] = &["bevy_app", "app", "AppLabel"];
pub const STAGE_LABEL: &[&str; 4] = &["bevy_ecs", "schedule", "label", "StageLabel"];
pub const SYSTEM_LABEL: &[&str; 4] = &["bevy_ecs", "schedule", "label", "SystemLabel"];
pub const RUN_CRITERIA_LABEL: &[&str; 4] = &["bevy_ecs", "schedule", "label", "RunCriteriaLabel"];
pub const AMBIGUITY_SET_LABEL: &[&str; 4] = &["bevy_ecs", "schedule", "label", "AmbiguitySetLabel"];

pub const TRANSFORM: &[&str; 4] = &["bevy_transform", "components", "transform", "Transform"];
pub const GLOBAL_TRANSFORM: &[&str; 4] = &[
"bevy_transform",
Expand Down
2 changes: 1 addition & 1 deletion src/bundle_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl<'tcx> LateLintPass<'tcx> for BundleLintPass {
let mut contains_transform = false;
let mut contains_global_transform = false;

for field in MixedTy::fields_from_struct_item(ctx, item).unwrap() {
for field in MixedTy::fields_from_struct_item(ctx, item).iter().flatten() {
if match_type(ctx, field.middle, TRANSFORM) {
contains_transform = true;
} else if match_type(ctx, field.middle, GLOBAL_TRANSFORM) {
Expand Down
Loading

0 comments on commit 33ad89d

Please sign in to comment.