diff --git a/src/form_urlencoded.rs b/src/form_urlencoded.rs index 78272c7c..9464156d 100644 --- a/src/form_urlencoded.rs +++ b/src/form_urlencoded.rs @@ -13,6 +13,7 @@ //! Converts between a string (such as an URL’s query string) //! and a sequence of (name, value) pairs. +use std::ascii::AsciiExt; use encoding::EncodingOverride; use percent_encoding::{percent_encode_to, percent_decode, FORM_URLENCODED_ENCODE_SET}; diff --git a/src/host.rs b/src/host.rs index f109ccb5..82b61b83 100644 --- a/src/host.rs +++ b/src/host.rs @@ -6,7 +6,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::ascii::OwnedAsciiExt; +use std::ascii::{AsciiExt, OwnedAsciiExt}; use std::cmp; use std::fmt::{mod, Formatter, Show}; use parser::{ParseResult, ParseError}; @@ -63,7 +63,7 @@ impl Host { ].as_slice()).is_some() { Err(ParseError::InvalidDomainCharacter) } else { - Ok(Host::Domain(domain.to_string().into_ascii_lower())) + Ok(Host::Domain(domain.to_string().into_ascii_lowercase())) } } } diff --git a/src/parser.rs b/src/parser.rs index b2ffbc53..7821c6ec 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -161,7 +161,7 @@ pub fn parse_scheme<'a>(input: &'a str, context: Context) -> Option<(String, &'a match c { 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.' => (), ':' => return Some(( - input.slice_to(i).to_ascii_lower(), + input.slice_to(i).to_ascii_lowercase(), input.slice_from(i + 1), )), _ => return None, @@ -169,7 +169,7 @@ pub fn parse_scheme<'a>(input: &'a str, context: Context) -> Option<(String, &'a } // EOF before ':' match context { - Context::Setter => Some((input.to_ascii_lower(), "")), + Context::Setter => Some((input.to_ascii_lowercase(), "")), Context::UrlParser => None } } diff --git a/src/punycode.rs b/src/punycode.rs index c0efee7f..4555683e 100644 --- a/src/punycode.rs +++ b/src/punycode.rs @@ -15,6 +15,7 @@ use std::u32; use std::char; +use std::ascii::AsciiExt; // Bootstring parameters for Punycode static BASE: u32 = 36;