X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Futils.rs;h=136a2c7fce24a802aac4c6e252e818b12db00ea1;hb=4a4addc5980e95e4f7883f2d56aedcd08626ba73;hp=c47b3b314dd4b31873405c3875aec1b698881032;hpb=826fb78bebc757acf138e86bd755e1d81c1d08bc;p=rust.git diff --git a/src/utils.rs b/src/utils.rs index c47b3b314dd..136a2c7fce2 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -479,9 +479,9 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr | ast::ExprKind::Binary(_, _, ref expr) | ast::ExprKind::Index(_, ref expr) | ast::ExprKind::Unary(_, ref expr) - | ast::ExprKind::Closure(_, _, _, _, _, ref expr, _) | ast::ExprKind::Try(ref expr) | ast::ExprKind::Yield(Some(ref expr)) => is_block_expr(context, expr, repr), + ast::ExprKind::Closure(ref closure) => is_block_expr(context, &closure.body, repr), // This can only be a string lit ast::ExprKind::Lit(_) => { repr.contains('\n') && trimmed_last_line_width(repr) <= context.config.tab_spaces()