mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace uses of for foo in bar.iter()
,
and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
This commit is contained in:
parent
f4b526cfb4
commit
067a22a868
32 changed files with 76 additions and 78 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue