summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2017-10-14 14:40:29 -0500
committerStuart Stock <stuart@int08h.com>2017-10-14 14:40:29 -0500
commite40e69d0f66b7b90afa26fb89bb43c0b1db96a0e (patch)
tree085906a71580b633a3f1cfc07a8aabce1ea17c14 /src
parent0e2bcfe77a791b66db0a16fe4ac572f7967ca8ee (diff)
downloadroughenough-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')
-rw-r--r--src/sign.rs2
-rw-r--r--src/tag.rs7
2 files changed, 3 insertions, 6 deletions
diff --git a/src/sign.rs b/src/sign.rs
index 8490f6c..e53e566 100644
--- a/src/sign.rs
+++ b/src/sign.rs
@@ -15,7 +15,7 @@
//! Ed25519 signing and verification
//!
//! `Ring` does not provide a multi-step (init-update-finish) interface
-//! for Ed25519 signatures. `Verifier` and `Signer` attempt to provide this
+//! for Ed25519 signatures. `Verifier` and `Signer` provide this
//! missing multi-step api.
extern crate ring;
diff --git a/src/tag.rs b/src/tag.rs
index ba7b9bd..3d8e74b 100644
--- a/src/tag.rs
+++ b/src/tag.rs
@@ -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(),
}
}