aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/urlhelper.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/urlhelper.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/urlhelper.rs')
-rw-r--r--components/script/dom/urlhelper.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/dom/urlhelper.rs b/components/script/dom/urlhelper.rs
index 8f3a005127d..290fede857c 100644
--- a/components/script/dom/urlhelper.rs
+++ b/components/script/dom/urlhelper.rs
@@ -5,6 +5,8 @@
use servo_util::str::DOMString;
use url::Url;
+use std::borrow::ToOwned;
+
pub struct UrlHelper;
impl UrlHelper {
@@ -14,16 +16,16 @@ impl UrlHelper {
pub fn Search(url: &Url) -> DOMString {
match url.query {
- None => "".into_string(),
- Some(ref query) if query.as_slice() == "" => "".into_string(),
+ None => "".to_owned(),
+ Some(ref query) if query.as_slice() == "" => "".to_owned(),
Some(ref query) => format!("?{}", query)
}
}
pub fn Hash(url: &Url) -> DOMString {
match url.fragment {
- None => "".into_string(),
- Some(ref hash) if hash.as_slice() == "" => "".into_string(),
+ None => "".to_owned(),
+ Some(ref hash) if hash.as_slice() == "" => "".to_owned(),
Some(ref hash) => format!("#{}", hash)
}
}