diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-01-31 14:36:05 +0100 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-02-11 14:48:34 -0800 |
commit | d5dd1d658e5d79701fb9d028479a0fcb26a033fa (patch) | |
tree | 0c243afe9d7d82695d16bd43d72e88600e4414ef /components/script/script_task.rs | |
parent | bc6882bdefc318402a46ede1494eb79339705c21 (diff) | |
download | servo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.tar.gz servo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.zip |
Upgrade to rustc ba2f13ef0 2015-02-04
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 983ec996794..6a261e5c128 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -71,7 +71,7 @@ use util::task_state; use geom::point::Point2D; use hyper::header::{Header, Headers, HeaderFormat}; -use hyper::header::shared::util as header_util; +use hyper::header::parsing as header_parsing; use js::jsapi::{JS_SetWrapObjectCallbacks, JS_SetGCZeal, JS_DEFAULT_ZEAL_FREQ, JS_GC}; use js::jsapi::{JSContext, JSRuntime, JSObject}; use js::jsapi::{JS_SetGCParameter, JSGC_MAX_BYTES}; @@ -84,7 +84,7 @@ use libc; use std::any::Any; use std::borrow::ToOwned; use std::cell::Cell; -use std::fmt::{self, Show}; +use std::fmt::{self, Display}; use std::mem::replace; use std::num::ToPrimitive; use std::rc::Rc; @@ -1363,13 +1363,13 @@ struct LastModified(pub Tm); impl Header for LastModified { #[inline] - fn header_name(_: Option<LastModified>) -> &'static str { + fn header_name() -> &'static str { "Last-Modified" } // Parses an RFC 2616 compliant date/time string, fn parse_header(raw: &[Vec<u8>]) -> Option<LastModified> { - header_util::from_one_raw_str(raw).and_then(|s: String| { + header_parsing::from_one_raw_str(raw).and_then(|s: String| { let s = s.as_slice(); strptime(s, "%a, %d %b %Y %T %Z").or_else(|_| { strptime(s, "%A, %d-%b-%y %T %Z") @@ -1386,8 +1386,8 @@ impl HeaderFormat for LastModified { fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { let LastModified(ref tm) = *self; match tm.tm_utcoff { - 0 => tm.rfc822().fmt(f), - _ => tm.to_utc().rfc822().fmt(f) + 0 => <_ as Display>::fmt(&tm.rfc822(), f), + _ => <_ as Display>::fmt(&tm.to_utc().rfc822(), f) } } } |