Replaced DOMString constructor by conversion functions.

Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
This commit is contained in:
Alan Jeffrey 2015-11-11 16:26:53 -06:00
parent 736323a779
commit 84bde75b42
64 changed files with 256 additions and 254 deletions

View file

@ -83,11 +83,11 @@ impl TextMethods for Text {
.last().unwrap();
let nodes = first.inclusively_following_siblings()
.take_while(|node| node.is::<Text>());
let mut text = DOMString::new();
let mut text = String::new();
for ref node in nodes {
let cdata = node.downcast::<CharacterData>().unwrap();
text.0.push_str(&cdata.data());
text.push_str(&cdata.data());
}
text
DOMString::from(text)
}
}