aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch
diff options
context:
space:
mode:
authorKeegan McAllister <mcallister.keegan@gmail.com>2014-09-20 15:35:08 -0700
committerKeegan McAllister <mcallister.keegan@gmail.com>2014-09-20 15:35:08 -0700
commit045328c8e94f5bdfcd67105c5dfa9209f4cd501c (patch)
tree1d5f8d958e12ae59e0ac720a7873e3c3b08cb1e8 /components/net/fetch
parentd6ba37c68c34a3748a789caeca225083275757e5 (diff)
parenta40b94d7f946d75e1a66af206efda9879b89c707 (diff)
downloadservo-045328c8e94f5bdfcd67105c5dfa9209f4cd501c.tar.gz
servo-045328c8e94f5bdfcd67105c5dfa9209f4cd501c.zip
Merge pull request #3438 from servo/rustup
Upgrade Rust
Diffstat (limited to 'components/net/fetch')
-rw-r--r--components/net/fetch/cors_cache.rs8
-rw-r--r--components/net/fetch/request.rs2
-rw-r--r--components/net/fetch/response.rs2
3 files changed, 6 insertions, 6 deletions
diff --git a/components/net/fetch/cors_cache.rs b/components/net/fetch/cors_cache.rs
index b98874af790..d7021cd7a6b 100644
--- a/components/net/fetch/cors_cache.rs
+++ b/components/net/fetch/cors_cache.rs
@@ -108,7 +108,7 @@ impl BasicCORSCache {
fn find_entry_by_header<'a>(&'a mut self, request: &CacheRequestDetails, header_name: &str) -> Option<&'a mut CORSCacheEntry> {
self.cleanup();
let BasicCORSCache(ref mut buf) = *self;
- let entry = buf.mut_iter().find(|e| e.origin.scheme == request.origin.scheme &&
+ let entry = buf.iter_mut().find(|e| e.origin.scheme == request.origin.scheme &&
e.origin.host() == request.origin.host() &&
e.origin.port() == request.origin.port() &&
e.url == request.destination &&
@@ -121,7 +121,7 @@ impl BasicCORSCache {
// we can take the method from CORSRequest itself
self.cleanup();
let BasicCORSCache(ref mut buf) = *self;
- let entry = buf.mut_iter().find(|e| e.origin.scheme == request.origin.scheme &&
+ let entry = buf.iter_mut().find(|e| e.origin.scheme == request.origin.scheme &&
e.origin.host() == request.origin.host() &&
e.origin.port() == request.origin.port() &&
e.url == request.destination &&
@@ -136,7 +136,7 @@ impl CORSCache for BasicCORSCache {
#[allow(dead_code)]
fn clear (&mut self, request: CacheRequestDetails) {
let BasicCORSCache(buf) = self.clone();
- let new_buf: Vec<CORSCacheEntry> = buf.move_iter().filter(|e| e.origin == request.origin && request.destination == e.url).collect();
+ let new_buf: Vec<CORSCacheEntry> = buf.into_iter().filter(|e| e.origin == request.origin && request.destination == e.url).collect();
*self = BasicCORSCache(new_buf);
}
@@ -144,7 +144,7 @@ impl CORSCache for BasicCORSCache {
fn cleanup(&mut self) {
let BasicCORSCache(buf) = self.clone();
let now = time::now().to_timespec();
- let new_buf: Vec<CORSCacheEntry> = buf.move_iter().filter(|e| now.sec > e.created.sec + e.max_age as i64).collect();
+ let new_buf: Vec<CORSCacheEntry> = buf.into_iter().filter(|e| now.sec > e.created.sec + e.max_age as i64).collect();
*self = BasicCORSCache(new_buf);
}
diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs
index c14efe9c59e..da933002fb8 100644
--- a/components/net/fetch/request.rs
+++ b/components/net/fetch/request.rs
@@ -79,7 +79,7 @@ pub struct Request {
pub manual_redirect: bool,
pub redirect_count: uint,
pub response_tainting: ResponseTainting,
- pub cache: Option<Box<CORSCache>>
+ pub cache: Option<Box<CORSCache+'static>>
}
impl Request {
diff --git a/components/net/fetch/response.rs b/components/net/fetch/response.rs
index 359ec6aa394..3ccb2ffe521 100644
--- a/components/net/fetch/response.rs
+++ b/components/net/fetch/response.rs
@@ -4,7 +4,7 @@
use url::Url;
use http::status::{Status, UnregisteredStatus};
-use StatusOk = http::status::Ok;
+use http::status::Ok as StatusOk;
use http::headers::HeaderEnum;
use http::headers::response::HeaderCollection;
use std::ascii::OwnedStrAsciiExt;