Skip to content

Commit 1589f68

Browse files
committed
cargo fmt
1 parent 2983614 commit 1589f68

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

src/rules/property.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ use super::Location;
44
#[cfg(feature = "visitor")]
55
use crate::visitor::Visit;
66
use crate::{
7-
error::{ParserError, PrinterError}, printer::Printer, properties::custom::TokenList, traits::{Parse, ToCss}, values::{
7+
error::{ParserError, PrinterError},
8+
printer::Printer,
9+
properties::custom::TokenList,
10+
traits::{Parse, ToCss},
11+
values::{
812
ident::DashedIdent,
913
syntax::{ParsedComponent, SyntaxString},
10-
}
14+
},
1115
};
1216
use cssparser::*;
1317

src/values/color.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ impl CssColor {
363363
// below and including the authored color space, and remove the ones that aren't
364364
// compatible with our browser targets.
365365
let mut fallbacks = match self {
366-
CssColor::CurrentColor | CssColor::RGBA(_) | CssColor::Float(..) | CssColor::System(..) => return ColorFallbackKind::empty(),
366+
CssColor::CurrentColor | CssColor::RGBA(_) | CssColor::Float(..) | CssColor::System(..) => {
367+
return ColorFallbackKind::empty()
368+
}
367369
CssColor::LAB(lab) => match &**lab {
368370
LABColor::LAB(..) | LABColor::LCH(..) if should_compile!(targets, LabColors) => {
369371
ColorFallbackKind::LAB.and_below()
@@ -458,8 +460,8 @@ impl IsCompatible for CssColor {
458460
},
459461
CssColor::LightDark(light, dark) => {
460462
Feature::LightDark.is_compatible(browsers) && light.is_compatible(browsers) && dark.is_compatible(browsers)
461-
},
462-
CssColor::System(system) => system.is_compatible(browsers)
463+
}
464+
CssColor::System(system) => system.is_compatible(browsers),
463465
}
464466
}
465467
}
@@ -2890,7 +2892,7 @@ macro_rules! color_space {
28902892
CssColor::Float(float) => (**float).into(),
28912893
CssColor::CurrentColor => return Err(()),
28922894
CssColor::LightDark(..) => return Err(()),
2893-
CssColor::System(..) => return Err(())
2895+
CssColor::System(..) => return Err(()),
28942896
})
28952897
}
28962898
}
@@ -2905,7 +2907,7 @@ macro_rules! color_space {
29052907
CssColor::Float(float) => (*float).into(),
29062908
CssColor::CurrentColor => return Err(()),
29072909
CssColor::LightDark(..) => return Err(()),
2908-
CssColor::System(..) => return Err(())
2910+
CssColor::System(..) => return Err(()),
29092911
})
29102912
}
29112913
}
@@ -3688,7 +3690,7 @@ impl IsCompatible for SystemColor {
36883690
use SystemColor::*;
36893691
match self {
36903692
AccentColor | AccentColorText => Feature::AccentSystemColor.is_compatible(browsers),
3691-
_ => true
3693+
_ => true,
36923694
}
36933695
}
36943696
}

src/values/syntax.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ impl<'i> SyntaxString {
201201
input: &mut Parser<'i, 't>,
202202
) -> Result<ParsedComponent<'i>, ParseError<'i, ParserError<'i>>> {
203203
match self {
204-
SyntaxString::Universal => Ok(ParsedComponent::TokenList(TokenList::parse(input, &ParserOptions::default(), 0)?)),
204+
SyntaxString::Universal => Ok(ParsedComponent::TokenList(TokenList::parse(
205+
input,
206+
&ParserOptions::default(),
207+
0,
208+
)?)),
205209
SyntaxString::Components(components) => {
206210
// Loop through each component, and return the first one that parses successfully.
207211
for component in components {

0 commit comments

Comments
 (0)