From 28e0a9e382ba8e2d82a95bc93b1ca5e1e871f714 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 13 Jul 2022 21:50:30 -0400 Subject: [PATCH] Don't indent multiple patterns --- crates/compiler/fmt/src/expr.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/compiler/fmt/src/expr.rs b/crates/compiler/fmt/src/expr.rs index a0f7ef8aae..5aaa313112 100644 --- a/crates/compiler/fmt/src/expr.rs +++ b/crates/compiler/fmt/src/expr.rs @@ -757,10 +757,7 @@ fn fmt_when<'a, 'buf>( } else { if is_multiline_patterns { buf.ensure_ends_with_newline(); - // Indent an extra level for the `|`; - // otherwise it'll be at the start of the line, - // and will be incorrectly parsed as a pattern - buf.indent(indent + INDENT + INDENT); + buf.indent(indent + INDENT); buf.push('|'); } else { buf.push_str(" |");