Skip to content

Commit 64cb141

Browse files
linesIterator -> lines
1 parent c3443dc commit 64cb141

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ trait MessageRendering {
9191
* @return aligned error message
9292
*/
9393
def errorMsg(pos: SourcePosition, msg: String, offset: Int)(implicit ctx: Context): String = {
94-
val padding = msg.linesIterator.foldLeft(pos.startColumnPadding) { (pad, line) =>
94+
val padding = msg.lines.foldLeft(pos.startColumnPadding) { (pad, line) =>
9595
val lineLength = stripColor(line).length
9696
val maxPad = math.max(0, ctx.settings.pageWidth.value - offset - lineLength) - offset
9797

9898
if (maxPad < pad.length) " " * maxPad
9999
else pad
100100
}
101101

102-
msg.linesIterator
102+
msg.lines
103103
.map { line => " " * (offset - 1) + "|" + padding + line}
104104
.mkString(sys.props("line.separator"))
105105
}

doc-tool/src/dotty/tools/dottydoc/model/comment/CommentCleaner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ trait CommentCleaner {
2121
SafeTags.replaceAllIn(javadoclessComment, { mtch =>
2222
Matcher.quoteReplacement(safeTagMarker + mtch.matched + safeTagMarker)
2323
})
24-
markedTagComment.linesIterator.toList map (cleanLine)
24+
markedTagComment.lines.toList map (cleanLine)
2525
}
2626
}

doc-tool/src/dotty/tools/dottydoc/staticsite/Page.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ trait Page {
115115
val withoutYaml = virtualFile(
116116
if (content.startsWith("---\n")) {
117117
val str =
118-
content.linesIterator
118+
content.lines
119119
.drop(1)
120120
.dropWhile(line => line != "---" && line != "...")
121121
.drop(1).mkString("\n")

0 commit comments

Comments
 (0)