mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
|
@ -150,7 +150,7 @@ impl ActorRegistry {
|
|||
}
|
||||
|
||||
pub fn actor_to_script(&self, actor: String) -> String {
|
||||
for (key, value) in self.script_actors.borrow().iter() {
|
||||
for (key, value) in &*self.script_actors.borrow() {
|
||||
println!("checking {}", value);
|
||||
if *value == actor {
|
||||
return key.to_string();
|
||||
|
@ -213,7 +213,7 @@ impl ActorRegistry {
|
|||
}
|
||||
|
||||
let old_actors = replace(&mut *self.old_actors.borrow_mut(), vec!());
|
||||
for name in old_actors.into_iter() {
|
||||
for name in old_actors {
|
||||
self.drop_actor(name);
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue