Skip to content

Commit d319910

Browse files
authored
Fix wording on DetectChanges::is_changed (#8550)
# Objective - Closes #8472 ## Solution - Fix wording on DetectChanges::is_changed
1 parent a616fa8 commit d319910

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/bevy_ecs/src/change_detection.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ pub trait DetectChanges {
4646
/// Returns `true` if this value was added after the system last ran.
4747
fn is_added(&self) -> bool;
4848

49-
/// Returns `true` if this value was added or mutably dereferenced after the system last ran.
49+
/// Returns `true` if this value was added or mutably dereferenced
50+
/// either since the last time the system ran or, if the system never ran,
51+
/// since the beginning of the program.
52+
///
53+
/// To check if the value was mutably dereferenced only,
54+
/// use `this.is_changed() && !this.is_added()`.
5055
fn is_changed(&self) -> bool;
5156

5257
/// Returns the change tick recording the time this data was most recently changed.

0 commit comments

Comments
 (0)