aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorJoão Oliveira <hello@jxs.pt>2015-08-18 01:36:04 +0100
committerJoão Oliveira <hello@jxs.pt>2015-08-18 01:46:11 +0100
commit067a22a868fb59be92df4f07c5ca54669dc1c229 (patch)
tree6a35298b4b3aa43c9d896f5cb7d63903611fb246 /components/script/script_task.rs
parentf4b526cfb4ea1ef263ff029650c74ff50a74d5db (diff)
downloadservo-067a22a868fb59be92df4f07c5ca54669dc1c229.tar.gz
servo-067a22a868fb59be92df4f07c5ca54669dc1c229.zip
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)
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index faf1f06d202..60d8887484c 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -709,7 +709,7 @@ impl ScriptTask {
}
}
- for (id, size) in resizes.into_iter() {
+ for (id, size) in resizes {
self.handle_event(id, ResizeEvent(size));
}
@@ -814,7 +814,7 @@ impl ScriptTask {
}
// Process the gathered events.
- for msg in sequential.into_iter() {
+ for msg in sequential {
match msg {
MixedMessage::FromConstellation(ConstellationControlMsg::ExitPipeline(id, exit_type)) => {
if self.handle_exit_pipeline_msg(id, exit_type) {
@@ -1652,7 +1652,7 @@ impl ScriptTask {
let document = page.document();
let mut prev_mouse_over_targets: RootedVec<JS<Node>> = RootedVec::new();
- for target in self.mouse_over_targets.borrow_mut().iter() {
+ for target in &*self.mouse_over_targets.borrow_mut() {
prev_mouse_over_targets.push(target.clone());
}
@@ -1663,7 +1663,7 @@ impl ScriptTask {
document.r().handle_mouse_move_event(self.js_runtime.rt(), point, &mut mouse_over_targets);
// Notify Constellation about anchors that are no longer mouse over targets.
- for target in prev_mouse_over_targets.iter() {
+ for target in &*prev_mouse_over_targets {
if !mouse_over_targets.contains(target) {
if target.root().r().is_anchor_element() {
let event = ConstellationMsg::NodeStatus(None);
@@ -1675,7 +1675,7 @@ impl ScriptTask {
}
// Notify Constellation about the topmost anchor mouse over target.
- for target in mouse_over_targets.iter() {
+ for target in &*mouse_over_targets {
let target = target.root();
if target.r().is_anchor_element() {
let element = ElementCast::to_ref(target.r()).unwrap();
@@ -1936,7 +1936,7 @@ fn shut_down_layout(page_tree: &Rc<Page>, exit_type: PipelineExitType) {
}
// Destroy the layout task. If there were node leaks, layout will now crash safely.
- for chan in channels.into_iter() {
+ for chan in channels {
chan.send(layout_interface::Msg::ExitNow(exit_type)).ok();
}
}