style: Fix some manual occurrences of try().

Depends on D80099

Differential Revision: https://phabricator.services.mozilla.com/D80100
This commit is contained in:
Emilio Cobos Álvarez 2020-06-17 22:27:45 +00:00
parent 3884328ce3
commit c578a82adc
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -149,12 +149,11 @@ impl Parse for BoxShadow {
}
}
if lengths.is_none() {
let value = input.try::<_, _, ParseError>(|i| {
let value = input.try_parse::<_, _, ParseError>(|i| {
let horizontal = Length::parse(context, i)?;
let vertical = Length::parse(context, i)?;
let (blur, spread) = match i
.try::<_, _, ParseError>(|i| Length::parse_non_negative(context, i))
{
let (blur, spread) =
match i.try_parse(|i| Length::parse_non_negative(context, i)) {
Ok(blur) => {
let spread = i.try_parse(|i| Length::parse(context, i)).ok();
(Some(blur.into()), spread)