aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domimplementation.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-20 14:45:36 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-20 14:49:07 +0100
commit01ed338746ae71493984259335197e6b66daec45 (patch)
treeb568699de2c64d6f4eb21b197fd648c354d0ed37 /components/script/dom/domimplementation.rs
parent2d5b0e085571594e7da2ee519605dd6fac2caa54 (diff)
downloadservo-01ed338746ae71493984259335197e6b66daec45.tar.gz
servo-01ed338746ae71493984259335197e6b66daec45.zip
Move to to_owned rather than into_string.
into_string has been removed from Rust.
Diffstat (limited to 'components/script/dom/domimplementation.rs')
-rw-r--r--components/script/dom/domimplementation.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs
index e298d275f47..285b86967e8 100644
--- a/components/script/dom/domimplementation.rs
+++ b/components/script/dom/domimplementation.rs
@@ -25,6 +25,8 @@ use dom::node::Node;
use dom::text::Text;
use servo_util::str::DOMString;
+use std::borrow::ToOwned;
+
#[dom_struct]
pub struct DOMImplementation {
reflector_: Reflector,
@@ -123,18 +125,18 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
{
// Step 3.
- let doc_type = DocumentType::new("html".into_string(), None, None, doc.r()).root();
+ let doc_type = DocumentType::new("html".to_owned(), None, None, doc.r()).root();
assert!(doc_node.AppendChild(NodeCast::from_ref(doc_type.r())).is_ok());
}
{
// Step 4.
- let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".into_string(), None, doc.r())).root();
+ let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".to_owned(), None, doc.r())).root();
assert!(doc_node.AppendChild(doc_html.r()).is_ok());
{
// Step 5.
- let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".into_string(), None, doc.r())).root();
+ let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".to_owned(), None, doc.r())).root();
assert!(doc_html.r().AppendChild(doc_head.r()).is_ok());
// Step 6.
@@ -142,7 +144,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
None => (),
Some(title_str) => {
// Step 6.1.
- let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".into_string(), None, doc.r())).root();
+ let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".to_owned(), None, doc.r())).root();
assert!(doc_head.r().AppendChild(doc_title.r()).is_ok());
// Step 6.2.
@@ -153,7 +155,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
}
// Step 7.
- let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".into_string(), None, doc.r()).root();
+ let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".to_owned(), None, doc.r()).root();
assert!(doc_html.r().AppendChild(NodeCast::from_ref(doc_body.r())).is_ok());
}