mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Use newline in places where it should obviously be used
This commit is contained in:
parent
2464cb107c
commit
8ab7b121eb
1 changed files with 3 additions and 4 deletions
|
@ -591,8 +591,7 @@ fn fmt_when<'a>(
|
|||
);
|
||||
for when_pattern in rest {
|
||||
if is_multiline {
|
||||
buf.push_str("\n");
|
||||
add_spaces(buf, indent + INDENT);
|
||||
newline(buf, indent + INDENT);
|
||||
buf.push_str("| ");
|
||||
} else {
|
||||
buf.push_str(" | ");
|
||||
|
@ -605,9 +604,9 @@ fn fmt_when<'a>(
|
|||
guard_expr.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent + INDENT);
|
||||
}
|
||||
|
||||
buf.push_str(" ->\n");
|
||||
buf.push_str(" ->");
|
||||
newline(buf, indent + INDENT * 2);
|
||||
|
||||
add_spaces(buf, indent + (INDENT * 2));
|
||||
match expr.value {
|
||||
Expr::SpaceBefore(nested, spaces) => {
|
||||
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent + (INDENT * 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue