Skip to content

Commit f811b7b

Browse files
committed
don't create an intermediate collection
1 parent c93aeae commit f811b7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ object SyntaxHighlighting {
7272
// Interpolation prefixes are a superset of the keyword start chars
7373
val (prefix, after) = remaining.span(interpolationPrefixes.contains)
7474
if (after.startsWith("\"")) {
75-
newBuf ++= (n +: prefix)
75+
newBuf += n ++= prefix
7676
prev = prefix.lastOption.getOrElse(n)
7777
if (remaining.nonEmpty) takeChars(prefix.length + 1) // drop 1 for appendLiteral
7878
appendString('"', after.startsWith("\"\"\""), true)

0 commit comments

Comments
 (0)