Skip to content

Commit 8ffc761

Browse files
committed
Merge pull request #70 from jmesmon/fix-remove-parse_bytes
Remove parse_bytes to work with latest rustc
2 parents a4fe4e2 + 7cf9cca commit 8ffc761

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/url.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
use std::fmt;
1212
use std::from_str::FromStr;
1313
use std::hash;
14-
use std::uint;
1514
use std::path::BytesContainer;
15+
use std::num;
16+
use std::str;
1617

1718
#[deriving(Clone, PartialEq, Eq)]
1819
pub struct Url {
@@ -158,7 +159,7 @@ fn decode_inner<T: BytesContainer>(c: T, full_url: bool) -> DecodeResult<String>
158159
};
159160

160161
// Only decode some characters if full_url:
161-
match uint::parse_bytes(bytes, 16u).unwrap() as u8 as char {
162+
match num::from_str_radix::<uint>(str::from_utf8(bytes).unwrap(), 16u).unwrap() as u8 as char {
162163
// gen-delims:
163164
':' | '/' | '?' | '#' | '[' | ']' | '@' |
164165

0 commit comments

Comments
 (0)