aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/urlhelper.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-25 17:05:08 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-26 10:52:55 +0200
commita862479ca801c92bbb744eb769e59d177435fb63 (patch)
treed2cb8c7a55dac2e68ab02c48bd07ea0165ff74b6 /components/script/dom/urlhelper.rs
parentef536372cdf26e5fd2ac7728e76482dc5d702cd0 (diff)
downloadservo-a862479ca801c92bbb744eb769e59d177435fb63.tar.gz
servo-a862479ca801c92bbb744eb769e59d177435fb63.zip
Remove as_slice() calls from script.
Diffstat (limited to 'components/script/dom/urlhelper.rs')
-rw-r--r--components/script/dom/urlhelper.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/urlhelper.rs b/components/script/dom/urlhelper.rs
index 4a86c75a722..d1930734f5c 100644
--- a/components/script/dom/urlhelper.rs
+++ b/components/script/dom/urlhelper.rs
@@ -20,7 +20,7 @@ impl UrlHelper {
pub fn Search(url: &Url) -> USVString {
USVString(match url.query {
None => "".to_owned(),
- Some(ref query) if query.as_slice() == "" => "".to_owned(),
+ Some(ref query) if query.is_empty() => "".to_owned(),
Some(ref query) => format!("?{}", query)
})
}
@@ -29,7 +29,7 @@ impl UrlHelper {
pub fn Hash(url: &Url) -> USVString {
USVString(match url.fragment {
None => "".to_owned(),
- Some(ref hash) if hash.as_slice() == "" => "".to_owned(),
+ Some(ref hash) if hash.is_empty() => "".to_owned(),
Some(ref hash) => format!("#{}", hash)
})
}