mirror of
https://github.com/sbt/sbt.git
synced 2026-10-07 18:43:31 +02:00
correct order for IO.readLines
This commit is contained in:
+1
-1
@@ -454,7 +454,7 @@ object IO
|
||||
|
||||
// Not optimized for large files
|
||||
def readLines(in: BufferedReader): List[String] =
|
||||
foldLines[List[String]](in, Nil)( (accum, line) => line :: accum )
|
||||
foldLines[List[String]](in, Nil)( (accum, line) => line :: accum ).reverse
|
||||
|
||||
def foreachLine(in: BufferedReader)(f: String => Unit): Unit =
|
||||
foldLines(in, ())( (_, line) => f(line) )
|
||||
|
||||
Reference in New Issue
Block a user