mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Shrink Collection to make parse_expr_size test pass
This commit is contained in:
parent
1fabc64fdf
commit
9bf1674946
8 changed files with 155 additions and 125 deletions
|
@ -408,9 +408,9 @@ fn fmt_bin_ops<'a>(
|
|||
loc_right_side.format_with_options(buf, apply_needs_parens, Newlines::Yes, indent);
|
||||
}
|
||||
|
||||
fn fmt_list<'a>(buf: &mut String<'a>, items: Collection<'a, &Located<Expr<'a>>>, indent: u16) {
|
||||
fn fmt_list<'a>(buf: &mut String<'a>, items: Collection<'a, &'a Located<Expr<'a>>>, indent: u16) {
|
||||
let loc_items = items.items;
|
||||
let final_comments = items.final_comments;
|
||||
let final_comments = items.final_comments();
|
||||
if loc_items.is_empty() && final_comments.iter().all(|c| c.is_newline()) {
|
||||
buf.push_str("[]");
|
||||
} else {
|
||||
|
@ -910,7 +910,7 @@ fn fmt_record<'a>(
|
|||
indent: u16,
|
||||
) {
|
||||
let loc_fields = fields.items;
|
||||
let final_comments = fields.final_comments;
|
||||
let final_comments = fields.final_comments();
|
||||
if loc_fields.is_empty() && final_comments.iter().all(|c| c.is_newline()) {
|
||||
buf.push_str("{}");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue