mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Always put the | in a has clause on a new line
This commit is contained in:
parent
8e6abc8079
commit
fd2ef1a3ce
1 changed files with 7 additions and 1 deletions
|
@ -324,7 +324,13 @@ impl<'a> Formattable for TypeAnnotation<'a> {
|
|||
|
||||
Where(annot, has_clauses) => {
|
||||
annot.format_with_options(buf, parens, newlines, indent);
|
||||
buf.spaces(1);
|
||||
|
||||
// Always put the `|` on the next line, indented.
|
||||
let indent = indent + INDENT;
|
||||
|
||||
buf.newline();
|
||||
buf.indent(indent);
|
||||
|
||||
for (i, has) in has_clauses.iter().enumerate() {
|
||||
buf.push(if i == 0 { '|' } else { ',' });
|
||||
buf.spaces(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue