mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Rustfmt recent changes.
This commit is contained in:
parent
69c7077b3d
commit
762abbaf9f
19 changed files with 163 additions and 101 deletions
|
@ -10,7 +10,8 @@ use crate::values::computed::{Context, ToComputedValue};
|
|||
use crate::values::specified;
|
||||
|
||||
pub use super::specified::{
|
||||
AlignContent, AlignItems, AlignTracks, ContentDistribution, JustifyContent, JustifyTracks, SelfAlignment,
|
||||
AlignContent, AlignItems, AlignTracks, ContentDistribution, JustifyContent, JustifyTracks,
|
||||
SelfAlignment,
|
||||
};
|
||||
pub use super::specified::{AlignSelf, JustifySelf};
|
||||
|
||||
|
|
|
@ -29,7 +29,10 @@ use std::cmp;
|
|||
use std::f32;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use self::align::{AlignContent, AlignItems, AlignTracks, JustifyContent, JustifyItems, JustifyTracks, SelfAlignment};
|
||||
pub use self::align::{
|
||||
AlignContent, AlignItems, AlignTracks, JustifyContent, JustifyItems, JustifyTracks,
|
||||
SelfAlignment,
|
||||
};
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use self::align::{AlignSelf, JustifySelf};
|
||||
pub use self::angle::Angle;
|
||||
|
@ -69,7 +72,9 @@ pub use self::motion::{OffsetPath, OffsetRotate};
|
|||
pub use self::outline::OutlineStyle;
|
||||
pub use self::percentage::{NonNegativePercentage, Percentage};
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{GridAutoFlow, GridTemplateAreas, MasonryAutoFlow, Position, PositionOrAuto, ZIndex};
|
||||
pub use self::position::{
|
||||
GridAutoFlow, GridTemplateAreas, MasonryAutoFlow, Position, PositionOrAuto, ZIndex,
|
||||
};
|
||||
pub use self::rect::NonNegativeLengthOrNumberRect;
|
||||
pub use self::resolution::Resolution;
|
||||
pub use self::svg::MozContextProperties;
|
||||
|
|
|
@ -300,19 +300,14 @@ impl SpecifiedValueInfo for AlignContent {
|
|||
)]
|
||||
#[repr(transparent)]
|
||||
#[css(comma)]
|
||||
pub struct AlignTracks(
|
||||
#[css(iterable, if_empty = "normal")]
|
||||
pub crate::OwnedSlice<AlignContent>
|
||||
);
|
||||
pub struct AlignTracks(#[css(iterable, if_empty = "normal")] pub crate::OwnedSlice<AlignContent>);
|
||||
|
||||
impl Parse for AlignTracks {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let values = input.parse_comma_separated(|input| {
|
||||
AlignContent::parse(context, input)
|
||||
})?;
|
||||
let values = input.parse_comma_separated(|input| AlignContent::parse(context, input))?;
|
||||
Ok(AlignTracks(values.into()))
|
||||
}
|
||||
}
|
||||
|
@ -373,8 +368,7 @@ impl SpecifiedValueInfo for JustifyContent {
|
|||
#[repr(transparent)]
|
||||
#[css(comma)]
|
||||
pub struct JustifyTracks(
|
||||
#[css(iterable, if_empty = "normal")]
|
||||
pub crate::OwnedSlice<JustifyContent>
|
||||
#[css(iterable, if_empty = "normal")] pub crate::OwnedSlice<JustifyContent>,
|
||||
);
|
||||
|
||||
impl Parse for JustifyTracks {
|
||||
|
@ -382,9 +376,7 @@ impl Parse for JustifyTracks {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let values = input.parse_comma_separated(|input| {
|
||||
JustifyContent::parse(context, input)
|
||||
})?;
|
||||
let values = input.parse_comma_separated(|input| JustifyContent::parse(context, input))?;
|
||||
Ok(JustifyTracks(values.into()))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,9 @@ pub use self::motion::{OffsetPath, OffsetRotate};
|
|||
pub use self::outline::OutlineStyle;
|
||||
pub use self::percentage::Percentage;
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{GridAutoFlow, GridTemplateAreas, MasonryAutoFlow, Position, PositionOrAuto};
|
||||
pub use self::position::{
|
||||
GridAutoFlow, GridTemplateAreas, MasonryAutoFlow, Position, PositionOrAuto,
|
||||
};
|
||||
pub use self::position::{PositionComponent, ZIndex};
|
||||
pub use self::rect::NonNegativeLengthOrNumberRect;
|
||||
pub use self::resolution::Resolution;
|
||||
|
|
|
@ -452,13 +452,12 @@ pub struct MasonryAutoFlow {
|
|||
|
||||
#[inline]
|
||||
fn is_pack_with_non_default_order(placement: &MasonryPlacement, order: &MasonryItemOrder) -> bool {
|
||||
*placement == MasonryPlacement::Pack &&
|
||||
*order != MasonryItemOrder::DefiniteFirst
|
||||
*placement == MasonryPlacement::Pack && *order != MasonryItemOrder::DefiniteFirst
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_item_order_definite_first(order: &MasonryItemOrder) -> bool {
|
||||
*order == MasonryItemOrder::DefiniteFirst
|
||||
*order == MasonryItemOrder::DefiniteFirst
|
||||
}
|
||||
|
||||
impl MasonryAutoFlow {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue