rustfmt
This commit is contained in:
parent
8458106833
commit
31fbb0a77e
@ -528,7 +528,9 @@ impl<'a> StyleSheetParser<'a> {
|
|||||||
Expr::Style(s) => stmts.push(Stmt::Style(s)),
|
Expr::Style(s) => stmts.push(Stmt::Style(s)),
|
||||||
Expr::AtRule(a) => match a {
|
Expr::AtRule(a) => match a {
|
||||||
AtRule::For(s) => stmts.extend(s),
|
AtRule::For(s) => stmts.extend(s),
|
||||||
AtRule::Content => return Err("@content is only allowed within mixin declarations.".into()),
|
AtRule::Content => {
|
||||||
|
return Err("@content is only allowed within mixin declarations.".into())
|
||||||
|
}
|
||||||
r => stmts.push(Stmt::AtRule(r)),
|
r => stmts.push(Stmt::AtRule(r)),
|
||||||
},
|
},
|
||||||
Expr::Styles(s) => stmts.extend(s.into_iter().map(Box::new).map(Stmt::Style)),
|
Expr::Styles(s) => stmts.extend(s.into_iter().map(Box::new).map(Stmt::Style)),
|
||||||
@ -694,7 +696,9 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
|
|||||||
AtRule::Warn(a, b) => Ok(Some(Expr::Warn(a, b))),
|
AtRule::Warn(a, b) => Ok(Some(Expr::Warn(a, b))),
|
||||||
AtRule::Error(pos, err) => Err(SassError::new(err, pos)),
|
AtRule::Error(pos, err) => Err(SassError::new(err, pos)),
|
||||||
AtRule::Return(_) => todo!("@return in unexpected location!"),
|
AtRule::Return(_) => todo!("@return in unexpected location!"),
|
||||||
AtRule::Content => return Err("@content is only allowed within mixin declarations.".into()),
|
AtRule::Content => {
|
||||||
|
return Err("@content is only allowed within mixin declarations.".into())
|
||||||
|
}
|
||||||
f @ AtRule::For(..) => Ok(Some(Expr::AtRule(f))),
|
f @ AtRule::For(..) => Ok(Some(Expr::AtRule(f))),
|
||||||
u @ AtRule::Unknown(..) => Ok(Some(Expr::AtRule(u))),
|
u @ AtRule::Unknown(..) => Ok(Some(Expr::AtRule(u))),
|
||||||
};
|
};
|
||||||
|
@ -98,7 +98,7 @@ impl Mixin {
|
|||||||
match expr {
|
match expr {
|
||||||
Expr::AtRule(a) => match a {
|
Expr::AtRule(a) => match a {
|
||||||
AtRule::Content => todo!("@content in mixin"),
|
AtRule::Content => todo!("@content in mixin"),
|
||||||
_ => stmts.push(Stmt::AtRule(a))
|
_ => stmts.push(Stmt::AtRule(a)),
|
||||||
},
|
},
|
||||||
Expr::Style(s) => stmts.push(Stmt::Style(s)),
|
Expr::Style(s) => stmts.push(Stmt::Style(s)),
|
||||||
Expr::Styles(s) => stmts.extend(s.into_iter().map(Box::new).map(Stmt::Style)),
|
Expr::Styles(s) => stmts.extend(s.into_iter().map(Box::new).map(Stmt::Style)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user