diff options
Diffstat (limited to 'src/libserialize/hex.rs')
| -rw-r--r-- | src/libserialize/hex.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs index a11eb3f7898..e477f4418a5 100644 --- a/src/libserialize/hex.rs +++ b/src/libserialize/hex.rs @@ -61,7 +61,7 @@ pub trait FromHex { } /// Errors that can occur when decoding a hex encoded string -#[derive(Copy)] +#[derive(Copy, Show)] pub enum FromHexError { /// The input contained a character not part of the hex format InvalidHexCharacter(char, uint), @@ -69,7 +69,7 @@ pub enum FromHexError { InvalidHexLength, } -impl fmt::Show for FromHexError { +impl fmt::Display for FromHexError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { InvalidHexCharacter(ch, idx) => @@ -86,10 +86,6 @@ impl error::Error for FromHexError { InvalidHexLength => "invalid length", } } - - fn detail(&self) -> Option<String> { - Some(format!("{:?}", self)) - } } |
