mirror of https://github.com/sbt/sbt.git
correct order for IO.readLines
This commit is contained in:
parent
b03b56ea2e
commit
bef61ab9fd
|
|
@ -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) )
|
||||
|
|
|
|||
Loading…
Reference in New Issue