mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: to_string() -> into_string()
This commit is contained in:
parent
475ff4dcb7
commit
e9d1740e19
39 changed files with 152 additions and 152 deletions
|
@ -14,16 +14,16 @@ impl UrlHelper {
|
|||
|
||||
pub fn Search(url: &Url) -> DOMString {
|
||||
match url.query {
|
||||
None => "".to_string(),
|
||||
Some(ref query) if query.as_slice() == "" => "".to_string(),
|
||||
None => "".into_string(),
|
||||
Some(ref query) if query.as_slice() == "" => "".into_string(),
|
||||
Some(ref query) => format!("?{}", query)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn Hash(url: &Url) -> DOMString {
|
||||
match url.fragment {
|
||||
None => "".to_string(),
|
||||
Some(ref hash) if hash.as_slice() == "" => "".to_string(),
|
||||
None => "".into_string(),
|
||||
Some(ref hash) if hash.as_slice() == "" => "".into_string(),
|
||||
Some(ref hash) => format!("#{}", hash)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue