Skip to content

Commit 2ed2094

Browse files
committed
Make the docs for AssetChanged reference get_cloned_mut instead of the old get_mut.
1 parent e40384e commit 2ed2094

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/bevy_asset/src/asset_changed.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ impl<'w, A: AsAssetId> AssetChangeCheck<'w, A> {
9292
///
9393
/// Unlike `Changed<A>`, this is true whenever the asset for the `A`
9494
/// in `ResMut<Assets<A>>` changed. For example, when a mesh changed through the
95-
/// [`Assets<Mesh>::get_mut`] method, `AssetChanged<Mesh>` will iterate over all
96-
/// entities with the `Handle<Mesh>` for that mesh. Meanwhile, `Changed<Handle<Mesh>>`
97-
/// will iterate over no entities.
95+
/// [`Assets<Mesh>::get_cloned_mut`] method, `AssetChanged<Mesh>` will iterate
96+
/// over all entities with the `Handle<Mesh>` for that mesh. Meanwhile,
97+
/// `Changed<Handle<Mesh>>` will iterate over no entities.
9898
///
9999
/// Swapping the actual `A` component is a common pattern. So you
100100
/// should check for _both_ `AssetChanged<A>` and `Changed<A>` with
@@ -121,7 +121,7 @@ impl<'w, A: AsAssetId> AssetChangeCheck<'w, A> {
121121
/// If no `A` asset updated since the last time the system ran, then no lookups occur.
122122
///
123123
/// [`AssetEvents`]: crate::AssetEvents
124-
/// [`Assets<Mesh>::get_mut`]: crate::Assets::get_mut
124+
/// [`Assets<Mesh>::get_cloned_mut`]: crate::Assets::get_cloned_mut
125125
pub struct AssetChanged<A: AsAssetId>(PhantomData<A>);
126126

127127
/// [`WorldQuery`] fetch for [`AssetChanged`].

0 commit comments

Comments
 (0)