diff options
Diffstat (limited to 'src/percent_encoded_character_decoder.rs')
-rw-r--r-- | src/percent_encoded_character_decoder.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/percent_encoded_character_decoder.rs b/src/percent_encoded_character_decoder.rs index b07be50..8a11c8d 100644 --- a/src/percent_encoded_character_decoder.rs +++ b/src/percent_encoded_character_decoder.rs @@ -2,11 +2,7 @@ use std::convert::TryFrom; -#[derive(Debug, Clone, thiserror::Error, PartialEq)] -pub enum Error { - #[error("illegal character")] - IllegalCharacter, -} +use super::error::Error; pub struct PercentEncodedCharacterDecoder { decoded_character: u8, @@ -50,7 +46,7 @@ impl PercentEncodedCharacterDecoder { self.decoded_character += u8::try_from(ci).unwrap(); } else { self.reset(); - return Err(Error::IllegalCharacter); + return Err(Error::IllegalPercentEncoding); } Ok(()) } |