Run rustfmt on selectors, servo_arc, and style.

This was generated with:

./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style

Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
This commit is contained in:
Bobby Holley 2018-04-10 17:35:15 -07:00
parent f7ae1a37e3
commit c99bcdd4b8
181 changed files with 9981 additions and 7933 deletions

View file

@ -10,8 +10,8 @@ use selectors::parser::SelectorParseErrorKind;
use style_traits::ParseError;
use values::specified::BorderStyle;
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord)]
#[derive(PartialEq, PartialOrd, ToComputedValue, ToCss)]
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord, PartialEq, PartialOrd, ToComputedValue,
ToCss)]
/// <https://drafts.csswg.org/css-ui/#propdef-outline-style>
pub enum OutlineStyle {
/// auto
@ -32,7 +32,7 @@ impl OutlineStyle {
pub fn none_or_hidden(&self) -> bool {
match *self {
OutlineStyle::Auto => false,
OutlineStyle::Other(ref border_style) => border_style.none_or_hidden()
OutlineStyle::Other(ref border_style) => border_style.none_or_hidden(),
}
}
}
@ -40,11 +40,12 @@ impl OutlineStyle {
impl Parse for OutlineStyle {
fn parse<'i, 't>(
_context: &ParserContext,
input: &mut Parser<'i, 't>
input: &mut Parser<'i, 't>,
) -> Result<OutlineStyle, ParseError<'i>> {
if let Ok(border_style) = input.try(BorderStyle::parse) {
if let BorderStyle::Hidden = border_style {
return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent("hidden".into())));
return Err(input
.new_custom_error(SelectorParseErrorKind::UnexpectedIdent("hidden".into())));
}
return Ok(OutlineStyle::Other(border_style));