Skip to content

Commit

Permalink
Router: remove currently unused comma split
Browse files Browse the repository at this point in the history
Follow-on to scalameta#1722.
  • Loading branch information
kitbellew committed Mar 4, 2020
1 parent 6b4096c commit 3858c65
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,12 @@ class Router(formatOps: FormatOps) {
Split(Space, 1, policy = multiLine)
)
}).map(_.onlyFor(SplitTag.OneArgPerLine))
def oneLineBody = open.pos.endLine == close.pos.startLine
Seq(
Split(Space, 0),
Split(Newline, 0)
.onlyIf(newlines != 0 && oneLineBody)
.onlyIf(oneArgPerLineSplits.isEmpty)
.onlyIf(newlines != 0)
.onlyIf(open.pos.endLine == close.pos.startLine)
.withOptimalToken(close, killOnFail = true)
.withPolicy(SingleLineBlock(close))
) ++ oneArgPerLineSplits
Expand Down

0 comments on commit 3858c65

Please sign in to comment.