Skip to content

Commit

Permalink
Tidy up the code of events (bevyengine#4713)
Browse files Browse the repository at this point in the history
# 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)
  • Loading branch information
DJMcNab authored and ItsDoot committed Feb 1, 2023
1 parent d1904f3 commit ca5605a
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 136 deletions.
2 changes: 1 addition & 1 deletion benches/benches/bevy_ecs/run_criteria.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bevy_ecs::{
component::Component,
prelude::{ParallelSystemDescriptorCoercion, Res, RunCriteriaDescriptorCoercion},
schedule::{ShouldRun, Stage, SystemStage},
system::{IntoSystem, Query},
system::Query,
world::World,
};
use criterion::{criterion_group, criterion_main, Criterion};
Expand Down
Loading

0 comments on commit ca5605a

Please sign in to comment.