diff options
| author | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
| commit | 45cbdec4174778bf915f17561ef971c068a7fcbc (patch) | |
| tree | 9516c60b7323f1233858665501a5029c9c3f90f0 /src/libserialize/hex.rs | |
| parent | 8ed288edb27fc83b15a549af69c82b5bb4f8ac1e (diff) | |
| parent | d27039d701a3c6e97f19e41436d06ed42c0f5f8a (diff) | |
| download | rust-45cbdec4174778bf915f17561ef971c068a7fcbc.tar.gz rust-45cbdec4174778bf915f17561ef971c068a7fcbc.zip | |
auto merge of #18719 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libserialize/hex.rs')
| -rw-r--r-- | src/libserialize/hex.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs index b591d35c67c..e045f94c08e 100644 --- a/src/libserialize/hex.rs +++ b/src/libserialize/hex.rs @@ -16,7 +16,7 @@ use std::string; use std::error; /// A trait for converting a value to hexadecimal encoding -pub trait ToHex { +pub trait ToHex for Sized? { /// Converts the value of `self` to a hex value, returning the owned /// string. fn to_hex(&self) -> String; @@ -24,7 +24,7 @@ pub trait ToHex { static CHARS: &'static[u8] = b"0123456789abcdef"; -impl<'a> ToHex for &'a [u8] { +impl ToHex for [u8] { /** * Turn a vector of `u8` bytes into a hexadecimal string. * @@ -54,7 +54,7 @@ impl<'a> ToHex for &'a [u8] { } /// A trait for converting hexadecimal encoded values -pub trait FromHex { +pub trait FromHex for Sized? { /// Converts the value of `self`, interpreted as hexadecimal encoded data, /// into an owned vector of bytes, returning the vector. fn from_hex(&self) -> Result<Vec<u8>, FromHexError>; @@ -92,7 +92,7 @@ impl error::Error for FromHexError { } -impl<'a> FromHex for &'a str { +impl FromHex for str { /** * Convert any hexadecimal encoded string (literal, `@`, `&`, or `~`) * to the byte values it encodes. |
