Merge pull request #7050 from roc-lang/arg-patterns-as

This commit is contained in:
Agus Zubiaga 2024-09-02 14:02:17 -03:00 committed by GitHub
commit 2469a3aa2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 179 additions and 1 deletions

View file

@ -1245,7 +1245,7 @@ fn fmt_closure<'a>(
let mut it = loc_patterns.iter().peekable();
while let Some(loc_pattern) = it.next() {
loc_pattern.format(buf, indent);
loc_pattern.format_with_options(buf, Parens::InAsPattern, Newlines::No, indent);
if it.peek().is_some() {
buf.indent(indent);