From 378dcacf8211c45b3d15e508e00bf0cbe9d6ef82 Mon Sep 17 00:00:00 2001 From: Christian Hughes <9044780+ItsDoot@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:57:22 -0500 Subject: [PATCH] Group `IntoSystemConfigs` `impl`s together (#15254) # Objective Two of the `IntoSystemConfigs` `impl`s are out of place near the top of the file. ## Solution Put them below the `IntoSystemConfigs` trait definition, alongside the other `impl`. --- crates/bevy_ecs/src/schedule/config.rs | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs index 96ab05d4eb..1fddf7e1a9 100644 --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -33,21 +33,6 @@ fn ambiguous_with(graph_info: &mut GraphInfo, set: InternedSystemSet) { } } -impl IntoSystemConfigs for F -where - F: IntoSystem<(), (), Marker>, -{ - fn into_configs(self) -> SystemConfigs { - SystemConfigs::new_system(Box::new(IntoSystem::into_system(self))) - } -} - -impl IntoSystemConfigs<()> for BoxedSystem<(), ()> { - fn into_configs(self) -> SystemConfigs { - SystemConfigs::new_system(self) - } -} - /// Stores configuration for a single generic node (a system or a system set) /// /// The configuration includes the node itself, scheduling metadata @@ -532,6 +517,21 @@ impl IntoSystemConfigs<()> for SystemConfigs { } } +impl IntoSystemConfigs for F +where + F: IntoSystem<(), (), Marker>, +{ + fn into_configs(self) -> SystemConfigs { + SystemConfigs::new_system(Box::new(IntoSystem::into_system(self))) + } +} + +impl IntoSystemConfigs<()> for BoxedSystem<(), ()> { + fn into_configs(self) -> SystemConfigs { + SystemConfigs::new_system(self) + } +} + #[doc(hidden)] pub struct SystemConfigTupleMarker;