Merge pull request #2838 from Ms2ger/text-clone

Remove an unnecessary string copy in the Text constructor.
This commit is contained in:
Lars Bergstrom 2014-07-15 08:30:37 -05:00
commit ab1a188e95

View file

@ -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))
}
}