From 978f7cd8bf9423961f663725cba18fb3ed75b46d Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Tue, 7 Feb 2023 22:59:19 +0000 Subject: [PATCH] Remove unused test resource in a bevy_ecs schedule unit test (#7551) Small commit to remove an unused resource scoped within a single bevy_ecs unit test. Also rearranged the initialization to follow initialization conventions of surrounding tests. World/Schedule initialization followed by resource initialization. This change was tested locally with `cargo test`, and `cargo fmt` was run. Risk should be tiny as change is scoped to a single unit test and very tiny, and I can't see any way that this resource is being used in the test. Thank you so much! --- crates/bevy_ecs/src/schedule/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/mod.rs b/crates/bevy_ecs/src/schedule/mod.rs index 5ad27d2b07..e44fc79e05 100644 --- a/crates/bevy_ecs/src/schedule/mod.rs +++ b/crates/bevy_ecs/src/schedule/mod.rs @@ -175,13 +175,11 @@ mod tests { #[test] fn add_systems_correct_order() { - #[derive(Resource)] - struct X(Vec); - let mut world = World::new(); + let mut schedule = Schedule::new(); + world.init_resource::(); - let mut schedule = Schedule::new(); schedule.add_systems( ( make_function_system(0),