Remove redundant closure

This commit is contained in:
Robert Dodd 2024-01-03 08:53:45 +11:00
parent b2174b0064
commit 55a680117b

View file

@ -123,7 +123,7 @@ where
pub fn use_event_reader<E: Event>(cx: &ScopeState) -> EventIterator<'_, E> { pub fn use_event_reader<E: Event>(cx: &ScopeState) -> EventIterator<'_, E> {
// TODO: Register the subscription // TODO: Register the subscription
let event_reader = cx.use_hook(|| ManualEventReader::default()); let event_reader = cx.use_hook(ManualEventReader::default);
let events = EcsContext::get_world(cx).resource::<Events<E>>(); let events = EcsContext::get_world(cx).resource::<Events<E>>();
event_reader.read(events) event_reader.read(events)
} }