aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/net/fetch/cors_cache.rs6
-rw-r--r--components/script/cors.rs6
-rw-r--r--components/script/script_thread.rs6
-rw-r--r--components/script/task_source/dom_manipulation.rs3
-rw-r--r--components/script/task_source/file_reading.rs3
-rw-r--r--components/script/task_source/history_traversal.rs3
-rw-r--r--components/script/task_source/networking.rs3
-rw-r--r--components/script/task_source/user_interaction.rs3
-rw-r--r--components/style/values.rs15
9 files changed, 17 insertions, 31 deletions
diff --git a/components/net/fetch/cors_cache.rs b/components/net/fetch/cors_cache.rs
index 27807e1e354..dc640ce4c37 100644
--- a/components/net/fetch/cors_cache.rs
+++ b/components/net/fetch/cors_cache.rs
@@ -124,16 +124,14 @@ impl BasicCORSCache {
fn find_entry_by_header<'a>(&'a mut self, request: &CacheRequestDetails,
header_name: &str) -> Option<&'a mut CORSCacheEntry> {
self.cleanup();
- let ref mut buf = self.0;
- buf.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_header(header_name))
+ self.0.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_header(header_name))
}
fn find_entry_by_method<'a>(&'a mut self, request: &CacheRequestDetails,
method: Method) -> Option<&'a mut CORSCacheEntry> {
// we can take the method from CORSRequest itself
self.cleanup();
- let ref mut buf = self.0;
- buf.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_method(&method))
+ self.0.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_method(&method))
}
}
diff --git a/components/script/cors.rs b/components/script/cors.rs
index 11312aba407..8be1ec9d6d2 100644
--- a/components/script/cors.rs
+++ b/components/script/cors.rs
@@ -394,9 +394,8 @@ impl CORSCache {
header_name: &str)
-> Option<&'a mut CORSCacheEntry> {
self.cleanup();
- let ref mut buf = self.0;
// Credentials are not yet implemented here
- buf.iter_mut().find(|e| {
+ self.0.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 &&
e.header_or_method.match_header(header_name)
@@ -421,9 +420,8 @@ impl CORSCache {
-> Option<&'a mut CORSCacheEntry> {
// we can take the method from CORSRequest itself
self.cleanup();
- let ref mut buf = self.0;
// Credentials are not yet implemented here
- buf.iter_mut().find(|e| {
+ self.0.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 &&
e.header_or_method.match_method(method)
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index de3d6b5cae2..5876f7d16c9 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -325,8 +325,7 @@ impl ScriptChan for SendableMainThreadScriptChan {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box SendableMainThreadScriptChan((*chan).clone())
+ box SendableMainThreadScriptChan((&self.0).clone())
}
}
@@ -348,8 +347,7 @@ impl ScriptChan for MainThreadScriptChan {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box MainThreadScriptChan((*chan).clone())
+ box MainThreadScriptChan((&self.0).clone())
}
}
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs
index 84ec1ca5e78..9676ade6ded 100644
--- a/components/script/task_source/dom_manipulation.rs
+++ b/components/script/task_source/dom_manipulation.rs
@@ -20,8 +20,7 @@ impl TaskSource<DOMManipulationTask> for DOMManipulationTaskSource {
}
fn clone(&self) -> Box<TaskSource<DOMManipulationTask> + Send> {
- let ref chan = self.0;
- box DOMManipulationTaskSource((*chan).clone())
+ box DOMManipulationTaskSource((&self.0).clone())
}
}
diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs
index a9813167e34..30e9530a76d 100644
--- a/components/script/task_source/file_reading.rs
+++ b/components/script/task_source/file_reading.rs
@@ -14,7 +14,6 @@ impl ScriptChan for FileReadingTaskSource {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box FileReadingTaskSource((*chan).clone())
+ box FileReadingTaskSource((&self.0).clone())
}
}
diff --git a/components/script/task_source/history_traversal.rs b/components/script/task_source/history_traversal.rs
index d4fb64864a3..c2d276e6eec 100644
--- a/components/script/task_source/history_traversal.rs
+++ b/components/script/task_source/history_traversal.rs
@@ -14,7 +14,6 @@ impl ScriptChan for HistoryTraversalTaskSource {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box HistoryTraversalTaskSource((*chan).clone())
+ box HistoryTraversalTaskSource((&self.0).clone())
}
}
diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs
index 29a5997475e..83160468395 100644
--- a/components/script/task_source/networking.rs
+++ b/components/script/task_source/networking.rs
@@ -14,7 +14,6 @@ impl ScriptChan for NetworkingTaskSource {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box NetworkingTaskSource((*chan).clone())
+ box NetworkingTaskSource((&self.0).clone())
}
}
diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs
index a4a2549e63d..254b0d008d1 100644
--- a/components/script/task_source/user_interaction.rs
+++ b/components/script/task_source/user_interaction.rs
@@ -14,7 +14,6 @@ impl ScriptChan for UserInteractionTaskSource {
}
fn clone(&self) -> Box<ScriptChan + Send> {
- let ref chan = self.0;
- box UserInteractionTaskSource((*chan).clone())
+ box UserInteractionTaskSource((&self.0).clone())
}
}
diff --git a/components/style/values.rs b/components/style/values.rs
index f1e125142d1..80a9a86b797 100644
--- a/components/style/values.rs
+++ b/components/style/values.rs
@@ -1077,10 +1077,9 @@ pub mod specified {
impl ToCss for BorderRadiusSize {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
- let size = self.0;
- try!(size.width.to_css(dest));
+ try!(self.0.width.to_css(dest));
try!(dest.write_str(" "));
- size.height.to_css(dest)
+ self.0.height.to_css(dest)
}
}
@@ -1641,19 +1640,17 @@ pub mod computed {
#[inline]
fn to_computed_value<Cx: TContext>(&self, context: &Cx) -> BorderRadiusSize {
- let size = self.0;
- let w = size.width.to_computed_value(context);
- let h = size.height.to_computed_value(context);
+ let w = self.0.width.to_computed_value(context);
+ let h = self.0.height.to_computed_value(context);
BorderRadiusSize(Size2D::new(w, h))
}
}
impl ::cssparser::ToCss for BorderRadiusSize {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
- let size = self.0;
- try!(size.width.to_css(dest));
+ try!(self.0.width.to_css(dest));
try!(dest.write_str("/"));
- size.height.to_css(dest)
+ self.0.height.to_css(dest)
}
}