Skip to content

Commit aa31d9f

Browse files
committed
Prefer linesIterator to iterate lines
1 parent 57db77a commit aa31d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
728728
testSource.checkFile.foreach(diffTest(testSource, _, reporterOutputLines(reporters), reporters, logger))
729729

730730
private def reporterOutputLines(reporters: Seq[TestReporter]): List[String] =
731-
reporters.flatMap(_.consoleOutput.split("\n")).toList
731+
reporters.flatMap(_.consoleOutput.linesIterator).toList
732732

733733
private[ParallelTesting] def executeTestSuite(): this.type = {
734734
assert(testSourcesCompleted == 0, "not allowed to re-use a `CompileRun`")
@@ -1041,7 +1041,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10411041
testReporter
10421042
}
10431043
if !failedBestEffortCompilation.isEmpty then
1044-
Some(failedBestEffortCompilation.flatMap(_.consoleOutput.split("\n")).mkString("\n"))
1044+
Some(failedBestEffortCompilation.flatMap(_.consoleOutput.linesIterator).mkString("\n"))
10451045
else
10461046
None
10471047
}

0 commit comments

Comments
 (0)