From 4c62d71950077499fba4f0081a14fae59c5b7ede Mon Sep 17 00:00:00 2001 From: Jim Turner Date: Thu, 22 Feb 2018 12:15:56 -0500 Subject: [PATCH] Derive more traits for events::ModifiersState (#411) --- CHANGELOG.md | 2 ++ src/events.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e61de293..9c7390a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- Impl `Hash`, `PartialEq`, and `Eq` for `events::ModifiersState`. + # Version 0.11.1 (2018-02-19) - Fixed windows not receiving mouse events when click-dragging the mouse outside the client area of a window, on Windows platforms. diff --git a/src/events.rs b/src/events.rs index 7aa1d726..f49beb73 100644 --- a/src/events.rs +++ b/src/events.rs @@ -433,7 +433,7 @@ pub enum VirtualKeyCode { /// Represents the current state of the keyboard modifiers /// /// Each field of this struct represents a modifier and is `true` if this modifier is active. -#[derive(Default, Debug, Clone, Copy)] +#[derive(Default, Debug, Hash, PartialEq, Eq, Clone, Copy)] pub struct ModifiersState { /// The "shift" key pub shift: bool,