Remove parse_bytes to work with latest rustc

This commit is contained in:
Cody P Schafer 2014-11-05 12:32:13 -05:00
parent a4fe4e2056
commit 7cf9ccab99

View File

@ -11,8 +11,9 @@
use std::fmt;
use std::from_str::FromStr;
use std::hash;
use std::uint;
use std::path::BytesContainer;
use std::num;
use std::str;
#[deriving(Clone, PartialEq, Eq)]
pub struct Url {
@ -158,7 +159,7 @@ fn decode_inner<T: BytesContainer>(c: T, full_url: bool) -> DecodeResult<String>
};
// Only decode some characters if full_url:
match uint::parse_bytes(bytes, 16u).unwrap() as u8 as char {
match num::from_str_radix::<uint>(str::from_utf8(bytes).unwrap(), 16u).unwrap() as u8 as char {
// gen-delims:
':' | '/' | '?' | '#' | '[' | ']' | '@' |