style: Reformat recent changes.

This commit is contained in:
Emilio Cobos Álvarez 2019-03-12 17:02:19 +01:00
parent 9a8cee2800
commit 5aeab7adb1
17 changed files with 70 additions and 53 deletions

View file

@ -652,7 +652,12 @@ impl ClipRect {
left = parse_argument(context, input, allow_quirks)?;
}
Ok(ClipRect { top, right, bottom, left })
Ok(ClipRect {
top,
right,
bottom,
left,
})
})
}
}

View file

@ -6,9 +6,9 @@
use crate::parser::{Parse, ParserContext};
use crate::values::generics::svg as generic;
use crate::values::specified::AllowQuirks;
use crate::values::specified::color::Color;
use crate::values::specified::url::SpecifiedUrl;
use crate::values::specified::AllowQuirks;
use crate::values::specified::LengthPercentage;
use crate::values::specified::{NonNegativeLengthPercentage, Opacity};
use crate::values::CustomIdent;
@ -52,10 +52,9 @@ macro_rules! parse_svg_length {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
if let Ok(lp) = input.try(|i| {
<$lp>::parse_quirky(context, i, AllowQuirks::Always)
}) {
return Ok(generic::SVGLength::LengthPercentage(lp))
if let Ok(lp) = input.try(|i| <$lp>::parse_quirky(context, i, AllowQuirks::Always))
{
return Ok(generic::SVGLength::LengthPercentage(lp));
}
try_match_ident_ignore_ascii_case! { input,
@ -65,7 +64,7 @@ macro_rules! parse_svg_length {
}
}
}
}
};
}
parse_svg_length!(SVGLength, LengthPercentage);
@ -78,11 +77,7 @@ impl Parse for SVGStrokeDashArray {
) -> Result<Self, ParseError<'i>> {
if let Ok(values) = input.try(|i| {
CommaWithSpace::parse(i, |i| {
NonNegativeLengthPercentage::parse_quirky(
context,
i,
AllowQuirks::Always,
)
NonNegativeLengthPercentage::parse_quirky(context, i, AllowQuirks::Always)
})
}) {
return Ok(generic::SVGStrokeDashArray::Values(values));