File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,12 @@ impl ReflectAsset {
71
71
/// # use bevy_asset::{ReflectAsset, HandleUntyped};
72
72
/// # use bevy_ecs::prelude::World;
73
73
/// # let reflect_asset: ReflectAsset = unimplemented!();
74
- /// # let world: World = unimplemented!();
74
+ /// # let mut world: World = unimplemented!();
75
75
/// # let handle_1: HandleUntyped = unimplemented!();
76
76
/// # let handle_2: HandleUntyped = unimplemented!();
77
- /// let a = unsafe { reflect_asset.get_unchecked_mut(&world, handle_1).unwrap() };
78
- /// let b = unsafe { reflect_asset.get_unchecked_mut(&world, handle_2).unwrap() };
77
+ /// let interior_mutable_world = world.as_interior_mutable();
78
+ /// let a = unsafe { reflect_asset.get_unchecked_mut(interior_mutable_world, handle_1).unwrap() };
79
+ /// let b = unsafe { reflect_asset.get_unchecked_mut(interior_mutable_world, handle_2).unwrap() };
79
80
/// // ^ not allowed, two mutable references through the same asset resource, even though the
80
81
/// // handles are distinct
81
82
///
You can’t perform that action at this time.
0 commit comments