Drop unnecessary from_utf8

This commit is contained in:
Steven Fackler
2016-04-05 22:17:06 -07:00
parent 66d3ffbbf7
commit e607d44aad

View File

@@ -9,7 +9,6 @@
// except according to those terms.
use std::io::prelude::*;
use std::str::FromStr;
use std::str;
use hex::FromHex;
pub struct Url {
@@ -133,8 +132,7 @@ fn decode_inner(c: &str, full_url: bool) -> DecodeResult<String> {
};
// Only decode some characters if full_url:
match Vec::<u8>::from_hex(str::from_utf8(&bytes)
.unwrap())
match Vec::<u8>::from_hex(&bytes)
.unwrap()[0] as char {
// gen-delims:
':' |