mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Use a pattern match over ==
This commit is contained in:
parent
267bae5dec
commit
ca0b40cd9d
1 changed files with 7 additions and 6 deletions
|
@ -577,12 +577,13 @@ fn format_spaces<'a, 'buf>(
|
|||
newlines: Newlines,
|
||||
indent: u16,
|
||||
) {
|
||||
let format_newlines = newlines == Newlines::Yes;
|
||||
|
||||
if format_newlines {
|
||||
fmt_spaces(buf, spaces.iter(), indent);
|
||||
} else {
|
||||
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent);
|
||||
match newlines {
|
||||
Newlines::Yes => {
|
||||
fmt_spaces(buf, spaces.iter(), indent);
|
||||
}
|
||||
Newlines::No => {
|
||||
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue