aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/status.rs')
-rw-r--r--src/encoding/status.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/status.rs b/src/encoding/status.rs
index 9fe03d7..61b2d2a 100644
--- a/src/encoding/status.rs
+++ b/src/encoding/status.rs
@@ -1,6 +1,6 @@
macro_rules! status_enum {
($v:vis enum $name:ident { $($variant:ident = $value:literal),*, }) => {
- #[derive(Debug, Clone)]
+ #[derive(Debug, Clone, Eq, PartialEq, Hash)]
$v enum $name { $($variant),*, Other(u16) }
impl $name { pub fn from_code(c: u16) -> Self { match c { $($value => Self::$variant),*, x => Self::Other(x) } } }
impl $name { pub fn to_code(&self) -> u16 { match self { $(Self::$variant => $value),*, Self::Other(x) => *x } } }