Skip to content

Commit e361894

Browse files
committed
Comment on private ListBuffer.locate
1 parent 7a75a09 commit e361894

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/src/scala/collection/mutable/ListBuffer.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class ListBuffer[A]
186186
last0 = null
187187
}
188188

189+
// returns the `::` at `i - 1` (such that its `next` at position `i` can be mutated), or `null` if `i == 0`.
189190
private def locate(i: Int): Predecessor[A] =
190191
if (i == 0) null
191192
else if (i == len) last0

0 commit comments

Comments
 (0)