Skip to content

Commit da3fb9a

Browse files
committed
Use String.repeat in scala.io.Source
1 parent 9f94dc2 commit da3fb9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/io/Source.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ abstract class Source extends Iterator[Char] with Closeable {
317317
report(pos, msg, out)
318318
}
319319

320-
private def spaces(n: Int) = List.fill(n)(' ').mkString
320+
private def spaces(n: Int) = " ".repeat(n)
321321
/**
322322
* @param pos the source position (line/column)
323323
* @param msg the error message to report

0 commit comments

Comments
 (0)