diff --git a/CHANGELOG.md b/CHANGELOG.md index 239db2b..f8f0067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.8.1 + +- Added the `E: EntityEvent` bound to `EventlistenerPlugin`, to move compile errors from adding the plugin, to the event itself. +- Fixed a benchmark bug. + # 0.8.0 - Updated to Bevy `0.14.0` diff --git a/Cargo.toml b/Cargo.toml index 7bf10ee..6306ee8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" [package] name = "bevy_eventlistener" -version = "0.8.0" +version = "0.8.1" edition = "2021" description = "Event listeners and callbacks for bevy" license = "MIT OR Apache-2.0" diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 8188bae..49b4c2f 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -37,7 +37,8 @@ fn event_listeners(c: &mut Criterion) { ( spawn_listener_hierarchy, add_listeners_to_hierarchy::, - ), + ) + .chain(), ) .add_plugins(EventListenerPlugin::>::default()) .add_systems(First, send_events::<1, N_EVENTS>); diff --git a/src/plugin.rs b/src/plugin.rs index b5f3392..c2c3a89 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -10,9 +10,9 @@ use crate::{event_dispatcher::EventDispatcher, event_listener::EntityEvent}; pub struct EventListenerSet; /// Adds event listening and bubbling support for event `E`. -pub struct EventListenerPlugin(std::marker::PhantomData); +pub struct EventListenerPlugin(std::marker::PhantomData); -impl Default for EventListenerPlugin { +impl Default for EventListenerPlugin { fn default() -> Self { Self(std::marker::PhantomData) }