Skip to content

Commit 94d9416

Browse files
committed
Tidy up the code of events (#4713)
# Objective - The code in `events.rs` was a bit messy. There was lots of duplication between `EventReader` and `ManualEventReader`, and the state management code is not needed. ## Solution - Clean it up. ## Future work Should we remove the type parameter from `ManualEventReader`? It doesn't have any meaning outside of its source `Events`. But there's no real reason why it needs to have a type parameter - it's just plain data. I didn't remove it yet to keep the type safety in some of the users of it (primarily related to `&mut World` usage)
1 parent 9a54e2b commit 94d9416

File tree

2 files changed

+122
-136
lines changed

2 files changed

+122
-136
lines changed

benches/benches/bevy_ecs/run_criteria.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use bevy_ecs::{
22
component::Component,
33
prelude::{ParallelSystemDescriptorCoercion, Res, RunCriteriaDescriptorCoercion},
44
schedule::{ShouldRun, Stage, SystemStage},
5-
system::{IntoSystem, Query},
5+
system::Query,
66
world::World,
77
};
88
use criterion::{criterion_group, criterion_main, Criterion};

0 commit comments

Comments
 (0)