mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -83,7 +83,7 @@ pub struct TimerManager {
|
|||
|
||||
impl Drop for TimerManager {
|
||||
fn drop(&mut self) {
|
||||
for (_, timer_handle) in self.active_timers.borrow_mut().iter_mut() {
|
||||
for (_, timer_handle) in &mut *self.active_timers.borrow_mut() {
|
||||
timer_handle.cancel();
|
||||
}
|
||||
}
|
||||
|
@ -125,12 +125,12 @@ impl TimerManager {
|
|||
}
|
||||
|
||||
pub fn suspend(&self) {
|
||||
for (_, timer_handle) in self.active_timers.borrow_mut().iter_mut() {
|
||||
for (_, timer_handle) in &mut *self.active_timers.borrow_mut() {
|
||||
timer_handle.suspend();
|
||||
}
|
||||
}
|
||||
pub fn resume(&self) {
|
||||
for (_, timer_handle) in self.active_timers.borrow_mut().iter_mut() {
|
||||
for (_, timer_handle) in &mut *self.active_timers.borrow_mut() {
|
||||
timer_handle.resume();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue