Skip to content

Commit 0ca992e

Browse files
Comments explaining tiny map functions
1 parent 766e25c commit 0ca992e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_ecs/src/event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,12 @@ impl<T: Component> Events<T> {
247247
}
248248
}
249249

250+
// Used in internal_event_reader instead of a closure to ensure stable type
250251
fn map_instance_event_with_id<T>(event_instance: &EventInstance<T>) -> (&T, EventId<T>) {
251252
(&event_instance.event, event_instance.event_id)
252253
}
253254

255+
// Used in internal_event_reader instead of a closure to ensure stable type
254256
fn map_instance_event<T>(event_instance: &EventInstance<T>) -> &T {
255257
&event_instance.event
256258
}

0 commit comments

Comments
 (0)