fix(serde deser): remove needless `len` check

Co-Authored-By: niklasad1 <niklasadolfsson1@gmail.com>
This commit is contained in:
cheme 2019-02-07 21:44:48 +01:00 committed by GitHub
parent 7a6ade2937
commit a05c677e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ pub fn deserialize_check_len<'de, D>(deserializer: D, len: ExpectedLen) -> Resul
}
fn visit_str<E: de::Error>(self, v: &str) -> Result<Self::Value, E> {
if v.len() < 2 || !v.starts_with("0x") {
if !v.starts_with("0x") {
return Err(E::custom("prefix is missing"))
}