Remove an unnecessary string copy in the Text constructor.

This commit is contained in:
Ms2ger 2014-07-15 14:19:33 +02:00
parent cd87775d4e
commit 054ab27e3b

View file

@ -40,7 +40,7 @@ impl Text {
pub fn Constructor(owner: &JSRef<Window>, text: DOMString) -> Fallible<Temporary<Text>> { pub fn Constructor(owner: &JSRef<Window>, text: DOMString) -> Fallible<Temporary<Text>> {
let document = owner.Document().root(); let document = owner.Document().root();
Ok(Text::new(text.clone(), &*document)) Ok(Text::new(text, &*document))
} }
} }