Skip to content

Commit 65f1eaf

Browse files
jbionqwwdfsad
jbion
authored andcommitted
Fix documentation of (suspend () -> T).asFlow()
The function calling asFlow() doesn't need to be suspending, and the doc seems to suggest otherwise.
1 parent ef696a0 commit 65f1eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx-coroutines-core/common/src/flow/Builders.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public fun <T> (() -> T).asFlow(): Flow<T> = flow {
6767
* Example of usage:
6868
* ```
6969
* suspend fun remoteCall(): R = ...
70-
* suspend fun remoteCallFlow(): Flow<R> = ::remoteCall.asFlow()
70+
* fun remoteCallFlow(): Flow<R> = ::remoteCall.asFlow()
7171
* ```
7272
*/
7373
@FlowPreview

0 commit comments

Comments
 (0)