mirror of
https://github.com/servo/servo.git
synced 2025-09-11 07:28:19 +01:00
style: Make creating CssUrl infallible.
There were a check in CssUrl::parse_from_string for extra data, which was removed as part of servo/servo#16241, so it never fails now. CssUrl::from_url_value_data doesn't seem to need Result from the very beginning. It is unclear why it was made that way. Bug: 1461858 Reviewed-by: emilio MozReview-Commit-ID: LXzKlZ6wPYW
This commit is contained in:
parent
0b5720547e
commit
dc2aadd43a
6 changed files with 28 additions and 42 deletions
|
@ -158,7 +158,7 @@ impl<'a, 'i, R: ParseErrorReporter> AtRuleParser<'i> for TopLevelRuleParser<'a,
|
|||
}
|
||||
|
||||
let url_string = input.expect_url_or_string()?.as_ref().to_owned();
|
||||
let url = CssUrl::parse_from_string(url_string, &self.context)?;
|
||||
let url = CssUrl::parse_from_string(url_string, &self.context);
|
||||
|
||||
let media = parse_media_query_list(&self.context, input,
|
||||
self.error_context.error_reporter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue