aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/urlhelper.rs
diff options
context:
space:
mode:
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)
})
}