mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Remove some into_owned calls.
This commit is contained in:
parent
9f915e9e42
commit
924031135e
4 changed files with 4 additions and 4 deletions
|
@ -98,7 +98,7 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
|||
let mut data = self.data.deref().borrow().as_slice().slice(0, offset as uint).to_string();
|
||||
data.push_str(arg.as_slice());
|
||||
data.push_str(self.data.deref().borrow().as_slice().slice((offset + count) as uint, length as uint));
|
||||
*self.data.deref().borrow_mut() = data.into_owned();
|
||||
*self.data.deref().borrow_mut() = data;
|
||||
// FIXME: Once we have `Range`, we should implement step7 to step11
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
let filter = ClassNameFilter {
|
||||
classes: split_html_space_chars(classes.as_slice()).map(|class| class.into_owned()).collect()
|
||||
classes: split_html_space_chars(classes.as_slice()).map(|class| class.to_string()).collect()
|
||||
};
|
||||
HTMLCollection::create(window, root, box filter)
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ pub fn serialize(iterator: &mut NodeIterator) -> String {
|
|||
html.push_str(open_elements.pop().unwrap().as_slice());
|
||||
html.push_str(">");
|
||||
}
|
||||
html.into_owned()
|
||||
html
|
||||
}
|
||||
|
||||
fn serialize_comment(comment: &JSRef<Comment>, html: &mut String) {
|
||||
|
|
|
@ -1539,7 +1539,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
|||
content.push_str(text.deref().characterdata.data.deref().borrow().as_slice());
|
||||
}
|
||||
}
|
||||
Some(content.into_owned())
|
||||
Some(content)
|
||||
}
|
||||
CommentNodeTypeId |
|
||||
TextNodeTypeId |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue