@@ -6,8 +6,9 @@ use crate::{
6
6
query:: { Access , FilteredAccessSet } ,
7
7
schedule:: { SystemLabel , SystemLabelId } ,
8
8
system:: {
9
- check_system_change_tick, MaybeUnsafeCell , ReadOnlySystemParamFetch , System , SystemParam ,
10
- SystemParamFetch , SystemParamItem , SystemParamState , WorldAccessLevel ,
9
+ assert_valid_world_access_level, check_system_change_tick, MaybeUnsafeCell ,
10
+ ReadOnlySystemParamFetch , System , SystemParam , SystemParamFetch , SystemParamItem ,
11
+ SystemParamState , WorldAccessLevel ,
11
12
} ,
12
13
world:: { World , WorldId } ,
13
14
} ;
@@ -140,7 +141,7 @@ pub struct SystemState<Param: SystemParam> {
140
141
141
142
impl < Param : SystemParam > SystemState < Param > {
142
143
pub fn new ( world : & mut World ) -> Self {
143
- let _ = < Param :: Fetch as SystemParamState > :: world_access_level ( ) ;
144
+ assert_valid_world_access_level :: < Param > ( ) ;
144
145
let mut meta = SystemMeta :: new :: < Param > ( ) ;
145
146
meta. last_change_tick = world. change_tick ( ) . wrapping_sub ( MAX_CHANGE_AGE ) ;
146
147
let param_state = <Param :: Fetch as SystemParamState >:: init ( world, & mut meta) ;
@@ -335,7 +336,7 @@ where
335
336
{
336
337
type System = FunctionSystem < In , Out , Param , Marker , F > ;
337
338
fn into_system ( func : Self ) -> Self :: System {
338
- let _ = < Param :: Fetch as SystemParamState > :: world_access_level ( ) ;
339
+ assert_valid_world_access_level :: < Param > ( ) ;
339
340
FunctionSystem {
340
341
func,
341
342
param_state : None ,
0 commit comments