@@ -3,7 +3,7 @@ use crate::{
33 component:: ComponentId ,
44 query:: Access ,
55 schedule:: { BoxedRunCriteriaLabel , GraphNode , RunCriteriaLabel } ,
6- system:: { BoxedSystem , System , SystemId } ,
6+ system:: { BoxedSystem , IntoSystem , System , SystemId } ,
77 world:: World ,
88} ;
99use std:: borrow:: Cow ;
@@ -197,12 +197,14 @@ impl IntoRunCriteria<BoxedSystem<(), ShouldRun>> for BoxedSystem<(), ShouldRun>
197197 }
198198}
199199
200- impl < S > IntoRunCriteria < BoxedSystem < ( ) , ShouldRun > > for S
200+ impl < S , Param > IntoRunCriteria < ( BoxedSystem < ( ) , ShouldRun > , Param ) > for S
201201where
202- S : System < In = ( ) , Out = ShouldRun > ,
202+ S : IntoSystem < ( ) , ShouldRun , Param > ,
203203{
204204 fn into ( self ) -> RunCriteriaDescriptorOrLabel {
205- RunCriteriaDescriptorOrLabel :: Descriptor ( new_run_criteria_descriptor ( Box :: new ( self ) ) )
205+ RunCriteriaDescriptorOrLabel :: Descriptor ( new_run_criteria_descriptor ( Box :: new (
206+ self . system ( ) ,
207+ ) ) )
206208 }
207209}
208210
@@ -227,7 +229,7 @@ impl IntoRunCriteria<RunCriteria> for RunCriteria {
227229 }
228230}
229231
230- pub trait RunCriteriaDescriptorCoercion {
232+ pub trait RunCriteriaDescriptorCoercion < Param > {
231233 /// Assigns a label to the criteria. Must be unique.
232234 fn label ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor ;
233235
@@ -242,7 +244,7 @@ pub trait RunCriteriaDescriptorCoercion {
242244 fn after ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor ;
243245}
244246
245- impl RunCriteriaDescriptorCoercion for RunCriteriaDescriptor {
247+ impl RunCriteriaDescriptorCoercion < ( ) > for RunCriteriaDescriptor {
246248 fn label ( mut self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
247249 self . label = Some ( Box :: new ( label) ) ;
248250 self . duplicate_label_strategy = DuplicateLabelStrategy :: Panic ;
@@ -276,7 +278,7 @@ fn new_run_criteria_descriptor(system: BoxedSystem<(), ShouldRun>) -> RunCriteri
276278 }
277279}
278280
279- impl RunCriteriaDescriptorCoercion for BoxedSystem < ( ) , ShouldRun > {
281+ impl RunCriteriaDescriptorCoercion < ( ) > for BoxedSystem < ( ) , ShouldRun > {
280282 fn label ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
281283 new_run_criteria_descriptor ( self ) . label ( label)
282284 }
@@ -294,24 +296,24 @@ impl RunCriteriaDescriptorCoercion for BoxedSystem<(), ShouldRun> {
294296 }
295297}
296298
297- impl < S > RunCriteriaDescriptorCoercion for S
299+ impl < S , Param > RunCriteriaDescriptorCoercion < Param > for S
298300where
299- S : System < In = ( ) , Out = ShouldRun > ,
301+ S : IntoSystem < ( ) , ShouldRun , Param > ,
300302{
301303 fn label ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
302- new_run_criteria_descriptor ( Box :: new ( self ) ) . label ( label)
304+ new_run_criteria_descriptor ( Box :: new ( self . system ( ) ) ) . label ( label)
303305 }
304306
305307 fn label_discard_if_duplicate ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
306- new_run_criteria_descriptor ( Box :: new ( self ) ) . label_discard_if_duplicate ( label)
308+ new_run_criteria_descriptor ( Box :: new ( self . system ( ) ) ) . label_discard_if_duplicate ( label)
307309 }
308310
309311 fn before ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
310- new_run_criteria_descriptor ( Box :: new ( self ) ) . before ( label)
312+ new_run_criteria_descriptor ( Box :: new ( self . system ( ) ) ) . before ( label)
311313 }
312314
313315 fn after ( self , label : impl RunCriteriaLabel ) -> RunCriteriaDescriptor {
314- new_run_criteria_descriptor ( Box :: new ( self ) ) . after ( label)
316+ new_run_criteria_descriptor ( Box :: new ( self . system ( ) ) ) . after ( label)
315317 }
316318}
317319
0 commit comments