diff --git a/crates/bevy_ecs/src/schedule/system_set.rs b/crates/bevy_ecs/src/schedule/system_set.rs index 5e32c2e48d..4d9aa47cd8 100644 --- a/crates/bevy_ecs/src/schedule/system_set.rs +++ b/crates/bevy_ecs/src/schedule/system_set.rs @@ -1,9 +1,9 @@ use crate::schedule::{ AmbiguitySetLabel, BoxedAmbiguitySetLabel, BoxedSystemLabel, IntoRunCriteria, - RunCriteriaDescriptorOrLabel, State, StateData, SystemDescriptor, SystemLabel, + IntoSystemDescriptor, RunCriteriaDescriptorOrLabel, State, StateData, SystemDescriptor, + SystemLabel, }; - -use super::IntoSystemDescriptor; +use crate::system::AsSystemLabel; /// A builder for describing several systems at the same time. #[derive(Default)] @@ -95,14 +95,14 @@ impl SystemSet { } #[must_use] - pub fn before(mut self, label: impl SystemLabel) -> Self { - self.before.push(Box::new(label)); + pub fn before(mut self, label: impl AsSystemLabel) -> Self { + self.before.push(Box::new(label.as_system_label())); self } #[must_use] - pub fn after(mut self, label: impl SystemLabel) -> Self { - self.after.push(Box::new(label)); + pub fn after(mut self, label: impl AsSystemLabel) -> Self { + self.after.push(Box::new(label.as_system_label())); self }