mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +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
|
@ -990,7 +990,7 @@ impl Parse for MozImageRect {
|
|||
input.try(|i| i.expect_function_matching("-moz-image-rect"))?;
|
||||
input.parse_nested_block(|i| {
|
||||
let string = i.expect_url_or_string()?;
|
||||
let url = SpecifiedImageUrl::parse_from_string(string.as_ref().to_owned(), context)?;
|
||||
let url = SpecifiedImageUrl::parse_from_string(string.as_ref().to_owned(), context);
|
||||
i.expect_comma()?;
|
||||
let top = NumberOrPercentage::parse_non_negative(context, i)?;
|
||||
i.expect_comma()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue