mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136 https://github.com/servo/rust-url/pull/137
This commit is contained in:
parent
0146751bb2
commit
f34da4120d
30 changed files with 346 additions and 128 deletions
|
@ -31,7 +31,7 @@ impl<'a> ParserContext<'a> {
|
|||
impl<'a> ParserContext<'a> {
|
||||
pub fn parse_url(&self, input: &str) -> Url {
|
||||
UrlParser::new().base_url(self.base_url).parse(input)
|
||||
.unwrap_or_else(|_| Url::parse("about:invalid").unwrap())
|
||||
.unwrap_or_else(|_| url!("about:invalid"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue