From c0db53a516a9afd05154a66084e6594d53df4d1b Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Fri, 20 Oct 2023 11:51:42 +0100 Subject: [PATCH] Implement `Ord`/`PartialOrd` for `ModifiersState` --- src/keyboard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keyboard.rs b/src/keyboard.rs index ac6f19c8..d5b04615 100644 --- a/src/keyboard.rs +++ b/src/keyboard.rs @@ -1682,7 +1682,7 @@ bitflags! { /// Represents the current state of the keyboard modifiers /// /// Each flag represents a modifier and is set if this modifier is active. - #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ModifiersState: u32 { /// The "shift" key. const SHIFT = 0b100;