File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
crates/bevy_ecs/src/world Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ use std::any::TypeId;
63
63
///
64
64
/// // the two interior mutable worlds borrow from the `&mut World`, so it cannot be accessed while they are live
65
65
/// fn split_world_access(world: &mut World) -> (OnlyResourceAccessWorld<'_>, OnlyComponentAccessWorld<'_>) {
66
- /// let resource_access = OnlyResourceAccessWorld(unsafe { world.as_interior_mutable() });
67
- /// let component_access = OnlyComponentAccessWorld(unsafe { world.as_interior_mutable() });
66
+ /// let interior_mutable_world = world.as_interior_mutable();
67
+ /// let resource_access = OnlyResourceAccessWorld(interior_mutable_world);
68
+ /// let component_access = OnlyComponentAccessWorld(interior_mutable_world);
68
69
/// (resource_access, component_access)
69
70
/// }
70
71
/// ```
You can’t perform that action at this time.
0 commit comments