std::from_str has been moved to std::str

This commit is contained in:
Jakob Gillich
2014-11-17 20:09:53 +01:00
parent 11b32da5c4
commit 125e1f7d63
10 changed files with 10 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
use std::fmt::{mod, Show};
use std::from_str::FromStr;
use std::str::from_utf8;
use std::str::{FromStr, from_utf8};
use serialize::base64::{ToBase64, FromBase64, Standard, Config};
use header::{Header, HeaderFormat};

View File

@@ -1,7 +1,7 @@
use header::{Header, HeaderFormat};
use std::fmt::{mod, Show};
use super::{from_comma_delimited, fmt_comma_delimited};
use std::from_str::FromStr;
use std::str::FromStr;
/// The `Connection` header.
#[deriving(Clone, PartialEq, Show)]

View File

@@ -1,7 +1,6 @@
use header::{Header, HeaderFormat};
use std::fmt::{mod, Show};
use std::str::from_utf8;
use std::from_str::from_str;
use std::str::{from_utf8, from_str};
use cookie::Cookie;
use cookie::CookieJar;

View File

@@ -1,7 +1,7 @@
use header::{Header, HeaderFormat};
use std::fmt::{mod, Show};
use super::util::from_one_raw_str;
use std::from_str::FromStr;
use std::str::FromStr;
use time::{Tm, strptime};
// Egh, replace as soon as something better than time::Tm exists.

View File

@@ -22,8 +22,7 @@ pub use self::server::Server;
pub use self::set_cookie::SetCookie;
use std::fmt::{mod, Show};
use std::from_str::FromStr;
use std::str::from_utf8;
use std::str::{FromStr, from_utf8};
macro_rules! bench_header(
($name:ident, $ty:ty, $value:expr) => {

View File

@@ -1,6 +1,6 @@
use header::{Header, HeaderFormat};
use std::fmt;
use std::from_str::FromStr;
use std::str::FromStr;
use super::{from_comma_delimited, fmt_comma_delimited};
/// The `Transfer-Encoding` header.
@@ -86,4 +86,3 @@ impl HeaderFormat for TransferEncoding {
bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] })
bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] })

View File

@@ -1,7 +1,7 @@
use header::{Header, HeaderFormat};
use std::fmt::{mod, Show};
use super::{from_comma_delimited, fmt_comma_delimited};
use std::from_str::FromStr;
use std::str::FromStr;
/// The `Upgrade` header.
#[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()] })

View File

@@ -1,7 +1,6 @@
//! Utility functions for Header implementations.
use std::from_str::FromStr;
use std::str::from_utf8;
use std::str::{FromStr, from_utf8};
/// 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> {

View File

@@ -457,7 +457,7 @@ mod tests {
}
fn parse_header(raw: &[Vec<u8>]) -> Option<CrazyLength> {
use std::str::from_utf8;
use std::from_str::FromStr;
use std::str::FromStr;
if raw.len() != 1 {
return None;
@@ -551,4 +551,3 @@ mod tests {
assert_eq!(headers.len(), 0);
}
}

View File

@@ -1,6 +1,6 @@
//! The HTTP request method
use std::fmt;
use std::from_str::FromStr;
use std::str::FromStr;
/// The Request Method (VERB)
///