Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add traits PartialEq and Eq to EventListenerOptions, and EventListenerPhase #363

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
### Next Version

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

### Version "0.1.1"

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