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
|
@ -90,7 +90,7 @@ impl<'a> TreeSink for servohtmlparser::Sink {
|
|||
let elem = Element::create(name, None, doc.r(),
|
||||
ElementCreator::ParserCreated);
|
||||
|
||||
for attr in attrs.into_iter() {
|
||||
for attr in attrs {
|
||||
elem.r().set_attribute_from_parser(attr.name, attr.value.into(), None);
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ impl<'a> TreeSink for servohtmlparser::Sink {
|
|||
let node: Root<Node> = target.root();
|
||||
let elem = ElementCast::to_ref(node.r())
|
||||
.expect("tried to set attrs on non-Element in HTML parsing");
|
||||
for attr in attrs.into_iter() {
|
||||
for attr in attrs {
|
||||
elem.set_attribute_from_parser(attr.name, attr.value.into(), None);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue