mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use push_str instead of operator + for efficiency.
This commit is contained in:
parent
e45b7fa22d
commit
6681476713
2 changed files with 2 additions and 2 deletions
|
@ -341,7 +341,7 @@ impl Document {
|
||||||
for child in node.children() {
|
for child in node.children() {
|
||||||
if child.is_text() {
|
if child.is_text() {
|
||||||
child.with_imm_text(|text| {
|
child.with_imm_text(|text| {
|
||||||
title = title + text.characterdata.Data();
|
title.push_str(text.characterdata.data.as_slice());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ impl Node {
|
||||||
for node in abstract_self.traverse_preorder() {
|
for node in abstract_self.traverse_preorder() {
|
||||||
if node.is_text() {
|
if node.is_text() {
|
||||||
node.with_imm_text(|text| {
|
node.with_imm_text(|text| {
|
||||||
content = content + text.characterdata.Data();
|
content.push_str(text.characterdata.data.as_slice());
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue