fix: formatting was eating the space in pair after the ,

This commit is contained in:
microproofs 2024-04-29 12:38:57 -04:00 committed by Kasey
parent fc0e88018e
commit 58779401e8
1 changed files with 6 additions and 4 deletions

View File

@ -984,9 +984,10 @@ impl<'comments> Formatter<'comments> {
.to_doc() .to_doc()
.append("(") .append("(")
.append(self.expr(fst, false)) .append(self.expr(fst, false))
.append(",") .append(break_(",", ", "))
.append(self.expr(snd, false)) .append(self.expr(snd, false))
.append(")"), .append(")")
.group(),
UntypedExpr::TupleIndex { index, tuple, .. } => { UntypedExpr::TupleIndex { index, tuple, .. } => {
let suffix = Ordinal(*index + 1).suffix().to_doc(); let suffix = Ordinal(*index + 1).suffix().to_doc();
@ -1791,9 +1792,10 @@ impl<'comments> Formatter<'comments> {
.to_doc() .to_doc()
.append("(") .append("(")
.append(self.pattern(fst)) .append(self.pattern(fst))
.append(",") .append(break_(",", ", "))
.append(self.pattern(snd)) .append(self.pattern(snd))
.append(")"), .append(")")
.group(),
Pattern::List { elements, tail, .. } => { Pattern::List { elements, tail, .. } => {
let elements_document = let elements_document =