mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
736323a779
commit
84bde75b42
64 changed files with 256 additions and 254 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue