1
Fork 0

Fix rustfmt

This commit is contained in:
Santiago Pastorino 2024-12-27 01:43:49 -03:00
parent 60b6470104
commit 8c456cbf5f
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 5 additions and 0 deletions

View file

@ -137,6 +137,10 @@ pub(crate) fn format_expr(
ast::ExprKind::Tup(ref items) => { ast::ExprKind::Tup(ref items) => {
rewrite_tuple(context, items.iter(), expr.span, shape, items.len() == 1) rewrite_tuple(context, items.iter(), expr.span, shape, items.len() == 1)
} }
ast::ExprKind::Use(_, _) => {
// FIXME: properly implement this
Ok(context.snippet(expr.span()).to_owned())
}
ast::ExprKind::Let(ref pat, ref expr, _span, _) => rewrite_let(context, shape, pat, expr), ast::ExprKind::Let(ref pat, ref expr, _span, _) => rewrite_let(context, shape, pat, expr),
ast::ExprKind::If(..) ast::ExprKind::If(..)
| ast::ExprKind::ForLoop { .. } | ast::ExprKind::ForLoop { .. }

View file

@ -513,6 +513,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
| ast::ExprKind::Become(..) | ast::ExprKind::Become(..)
| ast::ExprKind::Yeet(..) | ast::ExprKind::Yeet(..)
| ast::ExprKind::Tup(..) | ast::ExprKind::Tup(..)
| ast::ExprKind::Use(..)
| ast::ExprKind::Type(..) | ast::ExprKind::Type(..)
| ast::ExprKind::Yield(None) | ast::ExprKind::Yield(None)
| ast::ExprKind::Underscore => false, | ast::ExprKind::Underscore => false,