diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-20 14:45:36 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-20 14:49:07 +0100 |
commit | 01ed338746ae71493984259335197e6b66daec45 (patch) | |
tree | b568699de2c64d6f4eb21b197fd648c354d0ed37 /components/script/dom/attr.rs | |
parent | 2d5b0e085571594e7da2ee519605dd6fac2caa54 (diff) | |
download | servo-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/attr.rs')
-rw-r--r-- | components/script/dom/attr.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index 9a062679a4f..789e5f925d6 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -20,6 +20,7 @@ use servo_util::str::{DOMString, split_html_space_chars}; use string_cache::{Atom, Namespace}; +use std::borrow::ToOwned; use std::cell::Ref; use std::mem; @@ -138,11 +139,11 @@ impl Attr { impl<'a> AttrMethods for JSRef<'a, Attr> { fn LocalName(self) -> DOMString { - self.local_name().as_slice().into_string() + self.local_name().as_slice().to_owned() } fn Value(self) -> DOMString { - self.value().as_slice().into_string() + self.value().as_slice().to_owned() } fn SetValue(self, value: DOMString) { @@ -175,14 +176,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> { } fn Name(self) -> DOMString { - self.name.as_slice().into_string() + self.name.as_slice().to_owned() } fn GetNamespaceURI(self) -> Option<DOMString> { let Namespace(ref atom) = self.namespace; match atom.as_slice() { "" => None, - url => Some(url.into_string()), + url => Some(url.to_owned()), } } @@ -237,7 +238,7 @@ impl<'a> AttrHelpers<'a> for JSRef<'a, Attr> { fn summarize(self) -> AttrInfo { let Namespace(ref ns) = self.namespace; AttrInfo { - namespace: ns.as_slice().into_string(), + namespace: ns.as_slice().to_owned(), name: self.Name(), value: self.Value(), } |