File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
crates/bevy_ecs/src/system Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -706,27 +706,13 @@ impl<'w> SystemParam for &'w mut World {
706706 type Fetch = WorldMutState ;
707707}
708708
709+ // SAFETY: `WorldAccessLevel::Exclusive` is set and conflicts result in a panic at construction
709710unsafe impl SystemParamState for WorldMutState {
710711 fn init ( _world : & mut World , system_meta : & mut SystemMeta ) -> Self {
712+ // no need to check for param conflicts, but add access for system conflicts
711713 let mut world_access = FilteredAccess :: default ( ) ;
712714 world_access. write_all ( ) ;
713-
714- // conflict with any preceding param
715- if !system_meta
716- . component_access_set
717- . is_compatible_single ( & world_access)
718- {
719- panic ! (
720- "&mut World conflicts with another system param in {}. \
721- Mutable access must be unique.",
722- system_meta. name,
723- ) ;
724- }
725-
726- // conflict with any following param
727715 system_meta. component_access_set . add ( world_access) ;
728-
729- // executor
730716 system_meta. archetype_component_access . write_all ( ) ;
731717
732718 // world can contain non-send resources, must run on its local thread
You can’t perform that action at this time.
0 commit comments