Skip to content

Commit 906de5b

Browse files
authored
Update SyntaxHighlighting.scala
1 parent 87c039e commit 906de5b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/dotty/tools/dotc/printing/SyntaxHighlighting.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package printing
44

55
import parsing.Tokens._
66
import scala.annotation.switch
7-
import scala.collection.mutable
87
import scala.collection.mutable.StringBuilder
98

109
/** This object provides functions for syntax highlighting in the REPL */
@@ -39,7 +38,7 @@ object SyntaxHighlighting {
3938
def apply(chars: Iterable[Char]): Vector[Char] = {
4039
var prev: Char = 0
4140
var remaining = chars.toStream
42-
val newBuf = new mutable.StringBuilder
41+
val newBuf = new StringBuilder
4342

4443
@inline def keywordStart =
4544
prev == 0 || prev == ' ' || prev == '{' || prev == '(' || prev == '\n'
@@ -268,5 +267,4 @@ object SyntaxHighlighting {
268267

269268
newBuf.toVector
270269
}
271-
272270
}

0 commit comments

Comments
 (0)