rust upgrade
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| use std::fmt::{mod, Show}; | ||||
| use std::str::{FromStr, from_utf8}; | ||||
| use serialize::base64::{ToBase64, FromBase64, Standard, Config}; | ||||
| use serialize::base64::{ToBase64, FromBase64, Standard, Config, Newline}; | ||||
| use header::{Header, HeaderFormat}; | ||||
|  | ||||
| /// The `Authorization` header field. | ||||
| @@ -97,6 +97,7 @@ impl Scheme for Basic { | ||||
|         } | ||||
|         text.as_bytes().to_base64(Config { | ||||
|             char_set: Standard, | ||||
|             newline: Newline::CRLF, | ||||
|             pad: true, | ||||
|             line_length: None | ||||
|         }).fmt(f) | ||||
|   | ||||
| @@ -6,7 +6,7 @@ use super::util::from_one_raw_str; | ||||
| /// The `Content-Length` header. | ||||
| /// | ||||
| /// Simply a wrapper around a `uint`. | ||||
| #[deriving(Clone, PartialEq, Show)] | ||||
| #[deriving(Copy, Clone, PartialEq, Show)] | ||||
| pub struct ContentLength(pub uint); | ||||
|  | ||||
| deref!(ContentLength -> uint) | ||||
|   | ||||
| @@ -6,7 +6,7 @@ use super::util::{from_one_raw_str, tm_from_str}; | ||||
|  | ||||
| // Egh, replace as soon as something better than time::Tm exists. | ||||
| /// The `Date` header field. | ||||
| #[deriving(PartialEq, Clone)] | ||||
| #[deriving(Copy, PartialEq, Clone)] | ||||
| pub struct Date(pub Tm); | ||||
|  | ||||
| deref!(Date -> Tm) | ||||
|   | ||||
| @@ -118,7 +118,7 @@ mod tests { | ||||
|         etag = Header::parse_header([b"W/\"\x65\x62\"".to_vec()].as_slice()); | ||||
|         assert_eq!(etag, Some(Etag { | ||||
|             weak: true, | ||||
|             tag: "\u0065\u0062".into_string() | ||||
|             tag: "\u{0065}\u{0062}".into_string() | ||||
|         })); | ||||
|  | ||||
|         etag = Header::parse_header([b"W/\"\"".to_vec()].as_slice()); | ||||
| @@ -153,4 +153,4 @@ mod tests { | ||||
|     } | ||||
| } | ||||
|  | ||||
| bench_header!(bench, Etag, { vec![b"W/\"nonemptytag\"".to_vec()] }) | ||||
| bench_header!(bench, Etag, { vec![b"W/\"nonemptytag\"".to_vec()] }) | ||||
|   | ||||
| @@ -5,7 +5,7 @@ use header::{Header, HeaderFormat}; | ||||
| use super::util::{from_one_raw_str, tm_from_str}; | ||||
|  | ||||
| /// The `Expires` header field. | ||||
| #[deriving(PartialEq, Clone)] | ||||
| #[deriving(Copy, PartialEq, Clone)] | ||||
| pub struct Expires(pub Tm); | ||||
|  | ||||
| deref!(Expires -> Tm) | ||||
|   | ||||
| @@ -5,7 +5,7 @@ use header::{Header, HeaderFormat}; | ||||
| use super::util::{from_one_raw_str, tm_from_str}; | ||||
|  | ||||
| /// The `If-Modified-Since` header field. | ||||
| #[deriving(PartialEq, Clone)] | ||||
| #[deriving(Copy, PartialEq, Clone)] | ||||
| pub struct IfModifiedSince(pub Tm); | ||||
|  | ||||
| deref!(IfModifiedSince -> Tm) | ||||
|   | ||||
| @@ -5,7 +5,7 @@ use header::{Header, HeaderFormat}; | ||||
| use super::util::{from_one_raw_str, tm_from_str}; | ||||
|  | ||||
| /// The `LastModified` header field. | ||||
| #[deriving(PartialEq, Clone)] | ||||
| #[deriving(Copy, PartialEq, Clone)] | ||||
| pub struct LastModified(pub Tm); | ||||
|  | ||||
| deref!(LastModified -> Tm) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user