Remove parse_bytes to work with latest rustc
This commit is contained in:
parent
a4fe4e2056
commit
7cf9ccab99
@ -11,8 +11,9 @@
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::from_str::FromStr;
|
use std::from_str::FromStr;
|
||||||
use std::hash;
|
use std::hash;
|
||||||
use std::uint;
|
|
||||||
use std::path::BytesContainer;
|
use std::path::BytesContainer;
|
||||||
|
use std::num;
|
||||||
|
use std::str;
|
||||||
|
|
||||||
#[deriving(Clone, PartialEq, Eq)]
|
#[deriving(Clone, PartialEq, Eq)]
|
||||||
pub struct Url {
|
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:
|
// 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:
|
// gen-delims:
|
||||||
':' | '/' | '?' | '#' | '[' | ']' | '@' |
|
':' | '/' | '?' | '#' | '[' | ']' | '@' |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user