Skip to content

Commit caa7122

Browse files
docs tweaks
1 parent 3d82651 commit caa7122

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/bevy_ecs/src/change_detection.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,11 @@ impl<'a> MutUntyped<'a> {
635635
self.value.as_ref()
636636
}
637637

638-
/// Turn this [`MutUntyped`] into a [`Mut`] by mapping the inner [`PtrMut`] to another value.
638+
/// Turn this [`MutUntyped`] into a [`Mut`] by mapping the inner [`PtrMut`] to another value,
639+
/// without flagging a change. [`MutUntyped`] equivalent of [`Mut::map_unchanged`].
640+
///
641+
/// You should never modify the argument passed to the closure – if you want to modify the data without flagging a change, consider using [`DetectChanges::bypass_change_detection`](crate::change_detection::DetectChangesMut::bypass to make your intent explicit.
642+
///
639643
/// If you know the type of the value you can do
640644
/// ```no_run
641645
/// # use bevy_ecs::change_detection::{Mut, MutUntyped};

0 commit comments

Comments
 (0)