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

@ -536,12 +536,10 @@ pub mod basic_shape {
StyleGeometryBox, StyleShapeSource, StyleShapeSourceType,
};
use crate::gecko_bindings::sugar::refptr::RefPtr;
use crate::values::computed::basic_shape::{
BasicShape, ClippingShape, FloatAreaShape,
};
use crate::values::computed::basic_shape::{BasicShape, ClippingShape, FloatAreaShape};
use crate::values::computed::motion::OffsetPath;
use crate::values::computed::url::ComputedUrl;
use crate::values::generics::basic_shape::{Path, GeometryBox, ShapeBox, ShapeSource};
use crate::values::generics::basic_shape::{GeometryBox, Path, ShapeBox, ShapeSource};
use crate::values::specified::SVGPathData;
impl StyleShapeSource {

View file

@ -7,8 +7,8 @@
//! Different kind of helpers to interact with Gecko values.
use crate::counter_style::{Symbol, Symbols};
use crate::gecko_bindings::structs::{nsStyleCoord, CounterStylePtr};
use crate::gecko_bindings::structs::StyleGridTrackBreadth;
use crate::gecko_bindings::structs::{nsStyleCoord, CounterStylePtr};
use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
use crate::values::computed::{Angle, Length, LengthPercentage};
use crate::values::computed::{Number, NumberOrPercentage, Percentage};

View file

@ -680,5 +680,6 @@ ${helpers.predefined_type(
"Either::Second(None_)",
gecko_pref="layout.css.webkit-line-clamp.enabled",
animation_value_type="Integer",
products="gecko",
spec="https://drafts.csswg.org/css-overflow-3/#line-clamp",
)}

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(),
)))
}
}