Change to using add_run_criteria (#1282)

This commit is contained in:
Daniel McNab 2021-01-22 22:09:14 +00:00 committed by GitHub
parent 0a39c81be6
commit 6bd5ec8404
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,14 @@ impl SystemStage {
}
pub fn with_run_criteria<S: System<In = (), Out = ShouldRun>>(mut self, system: S) -> Self {
self.add_run_criteria(system);
self
}
pub fn add_run_criteria<S: System<In = (), Out = ShouldRun>>(
&mut self,
system: S,
) -> &mut Self {
self.run_criteria = Some(Box::new(system));
self.run_criteria_initialized = false;
self