style: Rustfmt + build fix.

This commit is contained in:
Emilio Cobos Álvarez 2019-05-09 19:12:32 +02:00
parent f429c28f23
commit db2f6aa8ca
9 changed files with 33 additions and 28 deletions

View file

@ -298,7 +298,6 @@ where
}
}
impl<T> ToAnimatedValue for Box<[T]>
where
T: ToAnimatedValue,
@ -307,8 +306,7 @@ where
#[inline]
fn to_animated_value(self) -> Self::AnimatedValue {
self
.into_vec()
self.into_vec()
.into_iter()
.map(T::to_animated_value)
.collect::<Vec<_>>()

View file

@ -352,12 +352,14 @@ impl Polygon {
})
.unwrap_or_default();
let coordinates = input.parse_comma_separated(|i| {
Ok(PolygonCoord(
LengthPercentage::parse(context, i)?,
LengthPercentage::parse(context, i)?,
))
})?.into();
let coordinates = input
.parse_comma_separated(|i| {
Ok(PolygonCoord(
LengthPercentage::parse(context, i)?,
LengthPercentage::parse(context, i)?,
))
})?
.into();
Ok(Polygon { fill, coordinates })
}

View file

@ -33,8 +33,7 @@ use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
pub struct SVGPathData(
// TODO(emilio): Should probably measure this somehow only from the
// specified values.
#[ignore_malloc_size_of = "Arc"]
pub crate::ArcSlice<PathCommand>
#[ignore_malloc_size_of = "Arc"] pub crate::ArcSlice<PathCommand>,
);
impl SVGPathData {
@ -103,7 +102,9 @@ impl Parse for SVGPathData {
}
}
Ok(SVGPathData(crate::ArcSlice::from_iter(path_parser.path.into_iter())))
Ok(SVGPathData(crate::ArcSlice::from_iter(
path_parser.path.into_iter(),
)))
}
}