std::from_str has been moved to std::str
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use std::from_str::FromStr;
|
use std::str::{FromStr, from_utf8};
|
||||||
use std::str::from_utf8;
|
|
||||||
use serialize::base64::{ToBase64, FromBase64, Standard, Config};
|
use serialize::base64::{ToBase64, FromBase64, Standard, Config};
|
||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use super::{from_comma_delimited, fmt_comma_delimited};
|
use super::{from_comma_delimited, fmt_comma_delimited};
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// The `Connection` header.
|
/// The `Connection` header.
|
||||||
#[deriving(Clone, PartialEq, Show)]
|
#[deriving(Clone, PartialEq, Show)]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use std::str::from_utf8;
|
use std::str::{from_utf8, from_str};
|
||||||
use std::from_str::from_str;
|
|
||||||
|
|
||||||
use cookie::Cookie;
|
use cookie::Cookie;
|
||||||
use cookie::CookieJar;
|
use cookie::CookieJar;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use super::util::from_one_raw_str;
|
use super::util::from_one_raw_str;
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
use time::{Tm, strptime};
|
use time::{Tm, strptime};
|
||||||
|
|
||||||
// Egh, replace as soon as something better than time::Tm exists.
|
// Egh, replace as soon as something better than time::Tm exists.
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ pub use self::server::Server;
|
|||||||
pub use self::set_cookie::SetCookie;
|
pub use self::set_cookie::SetCookie;
|
||||||
|
|
||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use std::from_str::FromStr;
|
use std::str::{FromStr, from_utf8};
|
||||||
use std::str::from_utf8;
|
|
||||||
|
|
||||||
macro_rules! bench_header(
|
macro_rules! bench_header(
|
||||||
($name:ident, $ty:ty, $value:expr) => {
|
($name:ident, $ty:ty, $value:expr) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
use super::{from_comma_delimited, fmt_comma_delimited};
|
use super::{from_comma_delimited, fmt_comma_delimited};
|
||||||
|
|
||||||
/// The `Transfer-Encoding` header.
|
/// The `Transfer-Encoding` header.
|
||||||
@@ -86,4 +86,3 @@ impl HeaderFormat for TransferEncoding {
|
|||||||
|
|
||||||
bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] })
|
bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] })
|
||||||
bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] })
|
bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] })
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use header::{Header, HeaderFormat};
|
use header::{Header, HeaderFormat};
|
||||||
use std::fmt::{mod, Show};
|
use std::fmt::{mod, Show};
|
||||||
use super::{from_comma_delimited, fmt_comma_delimited};
|
use super::{from_comma_delimited, fmt_comma_delimited};
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// The `Upgrade` header.
|
/// The `Upgrade` header.
|
||||||
#[deriving(Clone, PartialEq, Show)]
|
#[deriving(Clone, PartialEq, Show)]
|
||||||
@@ -52,4 +52,3 @@ impl HeaderFormat for Upgrade {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bench_header!(bench, Upgrade, { vec![b"HTTP/2.0, RTA/x11, websocket".to_vec()] })
|
bench_header!(bench, Upgrade, { vec![b"HTTP/2.0, RTA/x11, websocket".to_vec()] })
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
//! Utility functions for Header implementations.
|
//! Utility functions for Header implementations.
|
||||||
|
|
||||||
use std::from_str::FromStr;
|
use std::str::{FromStr, from_utf8};
|
||||||
use std::str::from_utf8;
|
|
||||||
|
|
||||||
/// Utility function that reads a single raw string when parsing a header
|
/// Utility function that reads a single raw string when parsing a header
|
||||||
pub fn from_one_raw_str<T: FromStr>(raw: &[Vec<u8>]) -> Option<T> {
|
pub fn from_one_raw_str<T: FromStr>(raw: &[Vec<u8>]) -> Option<T> {
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
fn parse_header(raw: &[Vec<u8>]) -> Option<CrazyLength> {
|
fn parse_header(raw: &[Vec<u8>]) -> Option<CrazyLength> {
|
||||||
use std::str::from_utf8;
|
use std::str::from_utf8;
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
if raw.len() != 1 {
|
if raw.len() != 1 {
|
||||||
return None;
|
return None;
|
||||||
@@ -551,4 +551,3 @@ mod tests {
|
|||||||
assert_eq!(headers.len(), 0);
|
assert_eq!(headers.len(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//! The HTTP request method
|
//! The HTTP request method
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::from_str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// The Request Method (VERB)
|
/// The Request Method (VERB)
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user