Skip to content

Commit cd1f73f

Browse files
committed
Refactor persistent vector implementation
- Replace System.arraycopy with copyInto - Extract common functions to Utils.kt - add docs for internal methods - assert size constraints
1 parent e0a257b commit cd1f73f

File tree

6 files changed

+233
-145
lines changed

6 files changed

+233
-145
lines changed

kotlinx-collections-immutable/src/main/kotlin/kotlinx/collections/immutable/implementations/immutableList/BufferIterator.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ package kotlinx.collections.immutable.implementations.immutableList
1818

1919
import java.util.NoSuchElementException
2020

21-
internal class BufferIterator<out T>(private val buffer: Array<T>,
22-
index: Int,
23-
size: Int) : AbstractListIterator<T>(index, size) {
21+
internal class BufferIterator<out T>(
22+
private val buffer: Array<T>,
23+
index: Int,
24+
size: Int
25+
) : AbstractListIterator<T>(index, size) {
2426
override fun next(): T {
2527
if (!hasNext()) {
2628
throw NoSuchElementException()

0 commit comments

Comments
 (0)