diff options
Diffstat (limited to 'src/encoding/status.rs')
-rw-r--r-- | src/encoding/status.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/encoding/status.rs b/src/encoding/status.rs index f06110d..9fe03d7 100644 --- a/src/encoding/status.rs +++ b/src/encoding/status.rs @@ -1,7 +1,6 @@ - macro_rules! status_enum { ($v:vis enum $name:ident { $($variant:ident = $value:literal),*, }) => { - #[derive(Debug)] + #[derive(Debug, Clone)] $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 } } } |