From 0b5e39c396c83e10bcc5c35c000a93ebdd74db13 Mon Sep 17 00:00:00 2001 From: Holden Date: Sat, 29 Dec 2018 02:37:56 -0500 Subject: [PATCH] Add additional derived traits to Key enum (#65) * Add partial ord and partial eq to keys enum * Derive eq on key * Derive ord --- src/key.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key.rs b/src/key.rs index cfad8c3..b853078 100644 --- a/src/key.rs +++ b/src/key.rs @@ -1,5 +1,5 @@ /// Key is used by the get key functions to check if some keys on the keyboard has been pressed -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum Key { Key0 = 0, Key1 = 1,