Revert "Don't keep comments right after the ->"

This reverts commit 326337ae00624e7f326ce92aa473a48283bcbf98.
This commit is contained in:
Richard Feldman 2022-07-13 23:09:37 -04:00
parent 18be76ea43
commit 47dd3743e7
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798

View File

@ -773,14 +773,14 @@ fn fmt_when<'a, 'buf>(
match expr.value {
Expr::SpaceBefore(nested, spaces) => {
fmt_spaces_no_blank_lines(buf, spaces.iter(), indent + (INDENT * 2));
if is_multiline_expr {
buf.ensure_ends_with_newline();
} else {
buf.spaces(1);
}
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent + (INDENT * 2));
nested.format_with_options(
buf,
Parens::NotNeeded,