Skip to content

Commit e607d44

Browse files
committed
Drop unnecessary from_utf8
1 parent 66d3ffb commit e607d44

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/url.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010
use std::io::prelude::*;
1111
use std::str::FromStr;
12-
use std::str;
1312
use hex::FromHex;
1413

1514
pub struct Url {
@@ -133,8 +132,7 @@ fn decode_inner(c: &str, full_url: bool) -> DecodeResult<String> {
133132
};
134133

135134
// Only decode some characters if full_url:
136-
match Vec::<u8>::from_hex(str::from_utf8(&bytes)
137-
.unwrap())
135+
match Vec::<u8>::from_hex(&bytes)
138136
.unwrap()[0] as char {
139137
// gen-delims:
140138
':' |

0 commit comments

Comments
 (0)