remove fmt_condition_spaces in favor of fmt_comments_only

This commit is contained in:
Sébastien Besnier 2020-11-15 10:35:17 +01:00
parent 25192fca10
commit c4bc98a81f
3 changed files with 37 additions and 53 deletions

View file

@ -1,7 +1,4 @@
use crate::spaces::{
fmt_comments_only,fmt_condition_spaces, fmt_spaces, newline, NewlineAt,
INDENT,
};
use crate::spaces::{fmt_comments_only, fmt_spaces, newline, NewlineAt, INDENT};
use bumpalo::collections::String;
use roc_parse::ast::{AssignedField, Expr, Tag, TypeAnnotation};
use roc_region::all::Located;
@ -466,9 +463,10 @@ macro_rules! implement_format_sequence {
buf.push(',');
}
fmt_condition_spaces(
fmt_comments_only(
buf,
spaces_below_expr.iter(),
NewlineAt::Top,
item_indent,
);
}
@ -489,7 +487,7 @@ macro_rules! implement_format_sequence {
buf.push(',');
}
fmt_condition_spaces(buf, spaces.iter(), item_indent);
fmt_comments_only(buf, spaces.iter(), NewlineAt::Top, item_indent);
}
_ => {