Remove some into_owned calls.

This commit is contained in:
Ms2ger 2014-06-28 17:07:47 +02:00
parent 9f915e9e42
commit 924031135e
4 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

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

View file

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