Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - SystemSet::before and after: take AsSystemLabel #4503

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions crates/bevy_ecs/src/schedule/system_set.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down Expand Up @@ -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<Marker>(mut self, label: impl AsSystemLabel<Marker>) -> 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<Marker>(mut self, label: impl AsSystemLabel<Marker>) -> Self {
self.after.push(Box::new(label.as_system_label()));
self
}

Expand Down