aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/page.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/page.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/page.rs')
-rw-r--r--components/script/page.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/page.rs b/components/script/page.rs
index f4b3fd6cd18..cea63c08a38 100644
--- a/components/script/page.rs
+++ b/components/script/page.rs
@@ -46,7 +46,7 @@ impl IterablePage for Rc<Page> {
}
fn find(&self, id: PipelineId) -> Option<Rc<Page>> {
if self.id == id { return Some(self.clone()); }
- for page in self.children.borrow().iter() {
+ for page in &*self.children.borrow() {
let found = page.find(id);
if found.is_some() { return found; }
}
@@ -104,7 +104,7 @@ impl Iterator for PageIterator {
fn next(&mut self) -> Option<Rc<Page>> {
match self.stack.pop() {
Some(next) => {
- for child in next.children.borrow().iter() {
+ for child in &*next.children.borrow() {
self.stack.push(child.clone());
}
Some(next)