File tree 1 file changed +2
-16
lines changed
crates/bevy_ecs/src/system
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 {
706
706
type Fetch = WorldMutState ;
707
707
}
708
708
709
+ // SAFETY: `WorldAccessLevel::Exclusive` is set and conflicts result in a panic at construction
709
710
unsafe impl SystemParamState for WorldMutState {
710
711
fn init ( _world : & mut World , system_meta : & mut SystemMeta ) -> Self {
712
+ // no need to check for param conflicts, but add access for system conflicts
711
713
let mut world_access = FilteredAccess :: default ( ) ;
712
714
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
727
715
system_meta. component_access_set . add ( world_access) ;
728
-
729
- // executor
730
716
system_meta. archetype_component_access . write_all ( ) ;
731
717
732
718
// world can contain non-send resources, must run on its local thread
You can’t perform that action at this time.
0 commit comments