diff --git a/pkstrings/src/lib.rs b/pkstrings/src/lib.rs index e710771..52754e8 100644 --- a/pkstrings/src/lib.rs +++ b/pkstrings/src/lib.rs @@ -147,13 +147,7 @@ impl TryFrom<&str> for PKString { type Error = Error; fn try_from(data: &str) -> Result { - for chr in data.chars() { - if ! STRTOHEX.contains_key(&chr) { - return Err(Error::InvalidCharacter); - } - } - - Ok(PKString(String::from(data))) + PKString::try_from(String::from(data)) } }