aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/animation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/animation.rs')
-rw-r--r--components/layout/animation.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/layout/animation.rs b/components/layout/animation.rs
index a3f27267c00..f22865592c3 100644
--- a/components/layout/animation.rs
+++ b/components/layout/animation.rs
@@ -60,7 +60,7 @@ pub fn process_new_animations(rw_data: &mut LayoutTaskData, pipeline_id: Pipelin
// Expire old running animations.
let now = clock_ticks::precise_time_s();
- for (_, running_animations) in running_animations.iter_mut() {
+ for (_, running_animations) in &mut running_animations {
running_animations.retain(|running_animation| now < running_animation.end_time);
}
@@ -97,7 +97,7 @@ pub fn recalc_style_for_animations(flow: &mut Flow,
let mut damage = RestyleDamage::empty();
flow.mutate_fragments(&mut |fragment| {
if let Some(ref animations) = animations.get(&OpaqueNode(fragment.node.id())) {
- for animation in animations.iter() {
+ for animation in *animations {
let now = clock_ticks::precise_time_s();
let mut progress = (now - animation.start_time) / animation.duration();
if progress > 1.0 {
@@ -130,4 +130,3 @@ pub fn tick_all_animations(layout_task: &LayoutTask, rw_data: &mut LayoutTaskDat
layout_task.script_chan.send(ConstellationControlMsg::TickAllAnimations(layout_task.id)).unwrap();
}
-