Skip to content

Commit 5410890

Browse files
committed
Promote Publisher<T>.collect to stable API
1 parent 46c18e3 commit 5410890

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

reactive/kotlinx-coroutines-reactive/src/Channel.kt

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public suspend inline fun <T> Publisher<T>.consumeEach(action: (T) -> Unit) =
3636
* Subscribes to this [Publisher] and performs the specified action for each received element.
3737
* Cancels subscription if any exception happens during collect.
3838
*/
39-
@ExperimentalCoroutinesApi // Since 1.2.1, tentatively till 1.3.0
4039
public suspend inline fun <T> Publisher<T>.collect(action: (T) -> Unit) =
4140
openSubscription().consumeEach(action)
4241

reactive/kotlinx-coroutines-reactive/src/Publish.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public fun <T> publish(
4848

4949
@Deprecated(
5050
message = "CoroutineScope.publish is deprecated in favour of top-level publish",
51-
level = DeprecationLevel.WARNING,
51+
level = DeprecationLevel.ERROR,
5252
replaceWith = ReplaceWith("publish(context, block)")
5353
) // Since 1.3.0, will be error in 1.3.1 and hidden in 1.4.0. Binary compatibility with Spring
5454
@LowPriorityInOverloadResolution

0 commit comments

Comments
 (0)