aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/trace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r--components/script/dom/bindings/trace.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index b0e082583f8..d05e099613f 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -178,7 +178,7 @@ impl<T: JSTraceable> JSTraceable for *mut T {
}
}
-impl<T: JSTraceable+Copy> JSTraceable for Cell<T> {
+impl<T: JSTraceable + Copy> JSTraceable for Cell<T> {
fn trace(&self, trc: *mut JSTracer) {
self.get().trace(trc)
}
@@ -212,7 +212,7 @@ impl JSTraceable for Heap<JSVal> {
impl<T: JSTraceable> JSTraceable for Vec<T> {
#[inline]
fn trace(&self, trc: *mut JSTracer) {
- for e in self.iter() {
+ for e in &*self {
e.trace(trc);
}
}
@@ -246,7 +246,7 @@ impl<T: JSTraceable, U: JSTraceable> JSTraceable for Result<T, U> {
}
}
-impl<K,V,S> JSTraceable for HashMap<K, V, S>
+impl<K, V, S> JSTraceable for HashMap<K, V, S>
where K: Hash + Eq + JSTraceable,
V: JSTraceable,
S: HashState,
@@ -254,7 +254,7 @@ impl<K,V,S> JSTraceable for HashMap<K, V, S>
{
#[inline]
fn trace(&self, trc: *mut JSTracer) {
- for (k, v) in self.iter() {
+ for (k, v) in &*self {
k.trace(trc);
v.trace(trc);
}
@@ -306,7 +306,7 @@ no_jsmanaged_fields!(WebGLError);
no_jsmanaged_fields!(ProfilerChan);
no_jsmanaged_fields!(PseudoElement);
-impl JSTraceable for Box<ScriptChan+Send> {
+impl JSTraceable for Box<ScriptChan + Send> {
#[inline]
fn trace(&self, _trc: *mut JSTracer) {
// Do nothing
@@ -327,7 +327,7 @@ impl<'a> JSTraceable for &'a str {
}
}
-impl<A,B> JSTraceable for fn(A) -> B {
+impl<A, B> JSTraceable for fn(A) -> B {
#[inline]
fn trace(&self, _: *mut JSTracer) {
// Do nothing
@@ -341,7 +341,7 @@ impl<T> JSTraceable for IpcSender<T> where T: Deserialize + Serialize {
}
}
-impl JSTraceable for Box<LayoutRPC+'static> {
+impl JSTraceable for Box<LayoutRPC + 'static> {
#[inline]
fn trace(&self, _: *mut JSTracer) {
// Do nothing