Skip to content

Commit 77e68fa

Browse files
committed
std::from_str has been moved to std::str
1 parent 5962bd6 commit 77e68fa

9 files changed

+9
-16
lines changed

common/authorization.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::fmt::{mod, Show};
2-
use std::from_str::FromStr;
3-
use std::str::from_utf8;
2+
use std::str::{FromStr, from_utf8};
43
use serialize::base64::{ToBase64, FromBase64, Standard, Config};
54
use header::{Header, HeaderFormat};
65

common/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use header::{Header, HeaderFormat};
22
use std::fmt::{mod, Show};
33
use super::{from_comma_delimited, fmt_comma_delimited};
4-
use std::from_str::FromStr;
4+
use std::str::FromStr;
55

66
/// The `Connection` header.
77
#[deriving(Clone, PartialEq, Show)]

common/cookie.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use header::{Header, HeaderFormat};
22
use std::fmt::{mod, Show};
3-
use std::str::from_utf8;
4-
use std::from_str::from_str;
3+
use std::str::{from_utf8, from_str};
54

65
use cookie::Cookie;
76
use cookie::CookieJar;

common/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use header::{Header, HeaderFormat};
22
use std::fmt::{mod, Show};
33
use super::util::from_one_raw_str;
4-
use std::from_str::FromStr;
4+
use std::str::FromStr;
55
use time::{Tm, strptime};
66

77
// Egh, replace as soon as something better than time::Tm exists.

common/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ pub use self::server::Server;
2222
pub use self::set_cookie::SetCookie;
2323

2424
use std::fmt::{mod, Show};
25-
use std::from_str::FromStr;
26-
use std::str::from_utf8;
25+
use std::str::{FromStr, from_utf8};
2726

2827
macro_rules! bench_header(
2928
($name:ident, $ty:ty, $value:expr) => {

common/transfer_encoding.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use header::{Header, HeaderFormat};
22
use std::fmt;
3-
use std::from_str::FromStr;
3+
use std::str::FromStr;
44
use super::{from_comma_delimited, fmt_comma_delimited};
55

66
/// The `Transfer-Encoding` header.
@@ -86,4 +86,3 @@ impl HeaderFormat for TransferEncoding {
8686

8787
bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] })
8888
bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] })
89-

common/upgrade.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use header::{Header, HeaderFormat};
22
use std::fmt::{mod, Show};
33
use super::{from_comma_delimited, fmt_comma_delimited};
4-
use std::from_str::FromStr;
4+
use std::str::FromStr;
55

66
/// The `Upgrade` header.
77
#[deriving(Clone, PartialEq, Show)]
@@ -52,4 +52,3 @@ impl HeaderFormat for Upgrade {
5252
}
5353

5454
bench_header!(bench, Upgrade, { vec![b"HTTP/2.0, RTA/x11, websocket".to_vec()] })
55-

common/util.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Utility functions for Header implementations.
22
3-
use std::from_str::FromStr;
4-
use std::str::from_utf8;
3+
use std::str::{FromStr, from_utf8};
54

65
/// Utility function that reads a single raw string when parsing a header
76
pub fn from_one_raw_str<T: FromStr>(raw: &[Vec<u8>]) -> Option<T> {

mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ mod tests {
457457
}
458458
fn parse_header(raw: &[Vec<u8>]) -> Option<CrazyLength> {
459459
use std::str::from_utf8;
460-
use std::from_str::FromStr;
460+
use std::str::FromStr;
461461

462462
if raw.len() != 1 {
463463
return None;
@@ -551,4 +551,3 @@ mod tests {
551551
assert_eq!(headers.len(), 0);
552552
}
553553
}
554-

0 commit comments

Comments
 (0)