Implement PartialOrd, Ord, and Hash for keyboard::Modifiers

This commit is contained in:
Héctor Ramón Jiménez 2024-02-20 01:31:04 +01:00
parent 49b3a714cc
commit b0d8da9fa6
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -2,7 +2,7 @@ use bitflags::bitflags;
bitflags! {
/// The current state of the keyboard modifiers.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Modifiers: u32{
/// The "shift" key.
const SHIFT = 0b100;