diff --git a/crates/bevy_ecs/src/observer/data.rs b/crates/bevy_ecs/src/observer/data.rs index 4854c64dfa1aa..4734d2e104a36 100644 --- a/crates/bevy_ecs/src/observer/data.rs +++ b/crates/bevy_ecs/src/observer/data.rs @@ -103,7 +103,7 @@ unsafe impl EventData for E { /// let on_remove = world.init_component::(); /// /// world.spawn( -/// Observer::new(|trigger: Trigger| { +/// Observer::new(|mut trigger: Trigger| { /// // This observer function is called for both OnAdd and OnRemove events! /// let ptr_mut = trigger.event_mut(); /// // do something with the PtrMut, if needed