diff options
author | Stuart Stock <stuart@int08h.com> | 2017-10-14 14:40:29 -0500 |
---|---|---|
committer | Stuart Stock <stuart@int08h.com> | 2017-10-14 14:40:29 -0500 |
commit | e40e69d0f66b7b90afa26fb89bb43c0b1db96a0e (patch) | |
tree | 085906a71580b633a3f1cfc07a8aabce1ea17c14 /src/tag.rs | |
parent | 0e2bcfe77a791b66db0a16fe4ac572f7967ca8ee (diff) | |
download | roughenough-e40e69d0f66b7b90afa26fb89bb43c0b1db96a0e.zip |
Rust 1.21 lands RFC 1414 enabling clean-up of warts in tag.rs; misc README and docstring updates
Diffstat (limited to 'src/tag.rs')
-rw-r--r-- | src/tag.rs | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -36,9 +36,6 @@ pub enum Tag { PAD, } -static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0xff]; -static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0x00]; - impl Tag { /// Translates a tag into its on-the-wire representation pub fn wire_value(&self) -> &'static [u8] { @@ -50,12 +47,12 @@ impl Tag { Tag::MIDP => "MIDP".as_bytes(), Tag::MINT => "MINT".as_bytes(), Tag::NONC => "NONC".as_bytes(), - Tag::PAD => PAD_VALUE.as_ref(), + Tag::PAD => [b'P', b'A', b'D', 0xff].as_ref(), Tag::PATH => "PATH".as_bytes(), Tag::PUBK => "PUBK".as_bytes(), Tag::RADI => "RADI".as_bytes(), Tag::ROOT => "ROOT".as_bytes(), - Tag::SIG => SIG_VALUE.as_ref(), + Tag::SIG => [b'S', b'I', b'G', 0x00].as_ref(), Tag::SREP => "SREP".as_bytes(), } } |