mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Reformat a match expression
This commit is contained in:
parent
32b04b3f51
commit
3831a0a4e0
1 changed files with 24 additions and 12 deletions
|
@ -200,30 +200,42 @@ trait ErrorHelpers<'a> {
|
||||||
|
|
||||||
fn extract_error_param<'a>(err: ParseError<'a>) -> Option<ErrorString<'a>> {
|
fn extract_error_param<'a>(err: ParseError<'a>) -> Option<ErrorString<'a>> {
|
||||||
Some(match err {
|
Some(match err {
|
||||||
CssParseError::Basic(BasicParseError::UnexpectedToken(t)) =>
|
CssParseError::Basic(BasicParseError::UnexpectedToken(t)) => {
|
||||||
ErrorString::UnexpectedToken(t),
|
ErrorString::UnexpectedToken(t)
|
||||||
|
}
|
||||||
|
|
||||||
CssParseError::Basic(BasicParseError::AtRuleInvalid(i)) |
|
CssParseError::Basic(BasicParseError::AtRuleInvalid(i)) |
|
||||||
CssParseError::Custom(SelectorParseError::Custom(
|
CssParseError::Custom(SelectorParseError::Custom(
|
||||||
StyleParseError::UnsupportedAtRule(i))) =>
|
StyleParseError::UnsupportedAtRule(i)
|
||||||
ErrorString::Snippet(format!("@{}", escape_css_ident(&i)).into()),
|
)) => {
|
||||||
|
ErrorString::Snippet(format!("@{}", escape_css_ident(&i)).into())
|
||||||
|
}
|
||||||
|
|
||||||
CssParseError::Custom(SelectorParseError::Custom(
|
CssParseError::Custom(SelectorParseError::Custom(
|
||||||
StyleParseError::PropertyDeclaration(
|
StyleParseError::PropertyDeclaration(
|
||||||
PropertyDeclarationParseError::InvalidValue(property, None)))) =>
|
PropertyDeclarationParseError::InvalidValue(property, None)
|
||||||
ErrorString::Snippet(property),
|
)
|
||||||
|
)) => {
|
||||||
|
ErrorString::Snippet(property)
|
||||||
|
}
|
||||||
|
|
||||||
CssParseError::Custom(SelectorParseError::UnexpectedIdent(ident)) =>
|
CssParseError::Custom(SelectorParseError::UnexpectedIdent(ident)) => {
|
||||||
ErrorString::Ident(ident),
|
ErrorString::Ident(ident)
|
||||||
|
}
|
||||||
|
|
||||||
CssParseError::Custom(SelectorParseError::Custom(
|
CssParseError::Custom(SelectorParseError::Custom(
|
||||||
StyleParseError::PropertyDeclaration(
|
StyleParseError::PropertyDeclaration(
|
||||||
PropertyDeclarationParseError::UnknownProperty(property)))) =>
|
PropertyDeclarationParseError::UnknownProperty(property)
|
||||||
ErrorString::Ident(property),
|
)
|
||||||
|
)) => {
|
||||||
|
ErrorString::Ident(property)
|
||||||
|
}
|
||||||
|
|
||||||
CssParseError::Custom(SelectorParseError::Custom(
|
CssParseError::Custom(SelectorParseError::Custom(
|
||||||
StyleParseError::UnexpectedTokenWithinNamespace(token))) =>
|
StyleParseError::UnexpectedTokenWithinNamespace(token)
|
||||||
ErrorString::UnexpectedToken(token),
|
)) => {
|
||||||
|
ErrorString::UnexpectedToken(token)
|
||||||
|
}
|
||||||
|
|
||||||
_ => return None,
|
_ => return None,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue