Skip to content

Commit

Permalink
Remove some of the annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed May 28, 2024
1 parent 393a486 commit 66b39fc
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ package kotlinx.coroutines
* Examples of closeable dispatchers are dispatchers backed by `java.lang.Executor` and
* by `kotlin.native.Worker`.
*/
@OptIn(ExperimentalSubclassOptIn::class)
@ExperimentalCoroutinesApi
@SubclassOptInRequired(ExperimentalForInheritanceCoroutinesApi::class)
public expect abstract class CloseableCoroutineDispatcher() : CoroutineDispatcher, AutoCloseable {

/**
Expand Down
1 change: 0 additions & 1 deletion kotlinx-coroutines-core/common/src/flow/Builders.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public fun <T> flowOf(value: T): Flow<T> = flow {
*/
public fun <T> emptyFlow(): Flow<T> = EmptyFlow

@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
private object EmptyFlow : Flow<Nothing> {
override suspend fun collect(collector: FlowCollector<Nothing>) = Unit
}
Expand Down
2 changes: 0 additions & 2 deletions kotlinx-coroutines-core/common/src/flow/Flow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ import kotlin.coroutines.*
* of the developer mistakes related to concurrency, inconsistent flow dispatchers, and cancellation.
*/
@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ExperimentalForInheritanceCoroutinesApi::class)
public interface Flow<out T> {

/**
Expand Down Expand Up @@ -220,7 +219,6 @@ public interface Flow<out T> {
* ```
*/
@ExperimentalCoroutinesApi
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
public abstract class AbstractFlow<T> : Flow<T>, CancellableFlow<T> {

public final override suspend fun collect(collector: FlowCollector<T>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ internal fun <T> Flow<T>.asChannelFlow(): ChannelFlow<T> =
*
* @suppress **This an internal API and should not be used from general code.**
*/
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
@InternalCoroutinesApi
public interface FusibleFlow<T> : Flow<T> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ internal tailrec fun Job?.transitiveCoroutineParent(collectJob: Job?): Job? {
* An analogue of the [flow] builder that does not check the context of execution of the resulting flow.
* Used in our own operators where we trust the context of invocations.
*/
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
@PublishedApi
internal inline fun <T> unsafeFlow(@BuilderInference crossinline block: suspend FlowCollector<T>.() -> Unit): Flow<T> {
return object : Flow<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ public fun <T> Flow<T>.cancellable(): Flow<T> =
/**
* Internal marker for flows that are [cancellable].
*/
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
internal interface CancellableFlow<out T> : Flow<T>

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ private fun <T> Flow<T>.distinctUntilChangedBy(
else -> DistinctFlowImpl(this, keySelector, areEquivalent)
}

@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
private class DistinctFlowImpl<T>(
private val upstream: Flow<T>,
@JvmField val keySelector: (T) -> Any?,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package kotlinx.coroutines

@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ExperimentalForInheritanceCoroutinesApi::class)
public actual abstract class CloseableCoroutineDispatcher actual constructor() : CoroutineDispatcher(), AutoCloseable {
public actual abstract override fun close()
}
1 change: 0 additions & 1 deletion kotlinx-coroutines-core/jvm/src/Executors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import kotlin.AutoCloseable
* asynchronous API that requires an instance of the [Executor].
*/
@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ExperimentalForInheritanceCoroutinesApi::class)
public abstract class ExecutorCoroutineDispatcher : CoroutineDispatcher(), Closeable, AutoCloseable {
/** @suppress */
@ExperimentalStdlibApi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package kotlinx.coroutines

@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ExperimentalForInheritanceCoroutinesApi::class)
public actual abstract class CloseableCoroutineDispatcher actual constructor() : CoroutineDispatcher(), AutoCloseable {
public actual abstract override fun close()
}

0 comments on commit 66b39fc

Please sign in to comment.