Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit f22378d

Browse files
committed
v0.8.1
1 parent 59cdf25 commit f22378d

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.8.1
2+
3+
- Added the `E: EntityEvent` bound to `EventlistenerPlugin<E>`, to move compile errors from adding the plugin, to the event itself.
4+
- Fixed a benchmark bug.
5+
16
# 0.8.0
27

38
- Updated to Bevy `0.14.0`

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resolver = "2"
66

77
[package]
88
name = "bevy_eventlistener"
9-
version = "0.8.0"
9+
version = "0.8.1"
1010
edition = "2021"
1111
description = "Event listeners and callbacks for bevy"
1212
license = "MIT OR Apache-2.0"

benches/benchmarks.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ fn event_listeners(c: &mut Criterion) {
3737
(
3838
spawn_listener_hierarchy,
3939
add_listeners_to_hierarchy::<DENSITY, 1>,
40-
),
40+
)
41+
.chain(),
4142
)
4243
.add_plugins(EventListenerPlugin::<TestEvent<1>>::default())
4344
.add_systems(First, send_events::<1, N_EVENTS>);

src/plugin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use crate::{event_dispatcher::EventDispatcher, event_listener::EntityEvent};
1010
pub struct EventListenerSet;
1111

1212
/// Adds event listening and bubbling support for event `E`.
13-
pub struct EventListenerPlugin<E>(std::marker::PhantomData<E>);
13+
pub struct EventListenerPlugin<E: EntityEvent>(std::marker::PhantomData<E>);
1414

15-
impl<E> Default for EventListenerPlugin<E> {
15+
impl<E: EntityEvent> Default for EventListenerPlugin<E> {
1616
fn default() -> Self {
1717
Self(std::marker::PhantomData)
1818
}

0 commit comments

Comments
 (0)