Use push_str instead of operator + for efficiency.

This commit is contained in:
Ms2ger 2014-02-16 10:25:12 +01:00
parent e45b7fa22d
commit 6681476713
2 changed files with 2 additions and 2 deletions

View file

@ -341,7 +341,7 @@ impl Document {
for child in node.children() {
if child.is_text() {
child.with_imm_text(|text| {
title = title + text.characterdata.Data();
title.push_str(text.characterdata.data.as_slice());
});
}
}

View file

@ -1064,7 +1064,7 @@ impl Node {
for node in abstract_self.traverse_preorder() {
if node.is_text() {
node.with_imm_text(|text| {
content = content + text.characterdata.Data();
content.push_str(text.characterdata.data.as_slice());
})
}
}