Remove deprecated and not stabilized primitive unsigned iterators
This commit is contained in:
@@ -43,11 +43,10 @@ internal constructor(@PublishedApi internal val storage: ByteArray) : Collection
|
||||
/** Creates an iterator over the elements of the array. */
|
||||
public override operator fun iterator(): kotlin.collections.Iterator<UByte> = Iterator(storage)
|
||||
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
private class Iterator(private val array: ByteArray) : UByteIterator() {
|
||||
private class Iterator(private val array: ByteArray) : kotlin.collections.Iterator<UByte> {
|
||||
private var index = 0
|
||||
override fun hasNext() = index < array.size
|
||||
override fun nextUByte() = if (index < array.size) array[index++].toUByte() else throw NoSuchElementException(index.toString())
|
||||
override fun next() = if (index < array.size) array[index++].toUByte() else throw NoSuchElementException(index.toString())
|
||||
}
|
||||
|
||||
override fun contains(element: UByte): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user