mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #2838 from Ms2ger/text-clone
Remove an unnecessary string copy in the Text constructor.
This commit is contained in:
commit
ab1a188e95
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ impl Text {
|
|||
|
||||
pub fn Constructor(owner: &JSRef<Window>, text: DOMString) -> Fallible<Temporary<Text>> {
|
||||
let document = owner.Document().root();
|
||||
Ok(Text::new(text.clone(), &*document))
|
||||
Ok(Text::new(text, &*document))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue