Skip to content

Commit

Permalink
Add traits PartialEq and Eq to EventListenerOptions, and EventListene…
Browse files Browse the repository at this point in the history
…rPhase
  • Loading branch information
Philipp-M committed Aug 7, 2023
1 parent f5f963a commit 6ec1b2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Next Version

- Migrate to Edition 2021 and Apply MSRV in Cargo.toml (#360)
- Add traits `PartialEq` and `Eq` to `EventListenerOptions`, and `EventListenerPhase` in `gloo-events` (#363)

### Version "0.2.3"

Expand Down
4 changes: 2 additions & 2 deletions crates/events/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use web_sys::{AddEventListenerOptions, Event, EventTarget};
/// EventListenerPhase::Bubble
/// # ;
/// ```
#[derive(Default, Debug, Clone, Copy)]
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
pub enum EventListenerPhase {
#[default]
#[allow(missing_docs)]
Expand Down Expand Up @@ -91,7 +91,7 @@ impl EventListenerPhase {
/// passive: false,
/// };
/// ```
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct EventListenerOptions {
/// The phase that the event listener should be run in.
pub phase: EventListenerPhase,
Expand Down

0 comments on commit 6ec1b2a

Please sign in to comment.