Remove redundant @OptIn
This commit is contained in:
@@ -140,7 +140,7 @@ public fun <T> Sequence<T>.shuffled(random: Random): Sequence<T> = sequence<T> {
|
||||
val buffer = toMutableList()
|
||||
while (buffer.isNotEmpty()) {
|
||||
val j = random.nextInt(buffer.size)
|
||||
val last = @OptIn(ExperimentalStdlibApi::class) buffer.removeLast()
|
||||
val last = buffer.removeLast()
|
||||
val value = if (j < buffer.size) buffer.set(j, last) else last
|
||||
yield(value)
|
||||
}
|
||||
|
||||
@@ -369,7 +369,6 @@ public fun Random.nextLong(range: LongRange): Long = when {
|
||||
internal expect fun defaultPlatformRandom(): Random
|
||||
internal expect fun doubleFromParts(hi26: Int, low27: Int): Double
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
internal fun fastLog2(value: Int): Int = 31 - value.countLeadingZeroBits()
|
||||
|
||||
/** Takes upper [bitCount] bits (0..32) from this number. */
|
||||
|
||||
@@ -500,7 +500,6 @@ public fun String.substringAfterLast(delimiter: String, missingDelimiterValue: S
|
||||
* @param startIndex the index of the first character to be replaced.
|
||||
* @param endIndex the index of the first character after the replacement to keep in the string.
|
||||
*/
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun CharSequence.replaceRange(startIndex: Int, endIndex: Int, replacement: CharSequence): CharSequence {
|
||||
if (endIndex < startIndex)
|
||||
throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).")
|
||||
@@ -546,7 +545,6 @@ public inline fun String.replaceRange(range: IntRange, replacement: CharSequence
|
||||
*
|
||||
* [endIndex] is not included in the removed part.
|
||||
*/
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun CharSequence.removeRange(startIndex: Int, endIndex: Int): CharSequence {
|
||||
if (endIndex < startIndex)
|
||||
throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).")
|
||||
|
||||
@@ -725,7 +725,6 @@ public value class Duration internal constructor(private val rawValue: Long) : C
|
||||
*
|
||||
* @sample samples.time.Durations.toIsoString
|
||||
*/
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun toIsoString(): String = buildString {
|
||||
if (isNegative()) append('-')
|
||||
append("PT")
|
||||
|
||||
Reference in New Issue
Block a user