Drop deprecated sequence() and withIndices()
This commit is contained in:
@@ -1116,15 +1116,6 @@ public fun <T> Iterable<T>.withIndex(): Iterable<IndexedValue<T>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun <T> Iterable<T>.withIndices(): List<Pair<Int, T>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, T>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing only distinct elements from the given collection.
|
||||
* The elements in the resulting list are in the same order as they were in the source collection.
|
||||
@@ -1650,14 +1641,6 @@ public fun <T> Iterable<T>.asSequence(): Sequence<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun <T> Iterable<T>.sequence(): Sequence<T> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing all elements that are instances of specified type parameter R.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user