File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
kotlinx-coroutines-core/common/src/flow/operators Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ public inline fun <T, R> Flow<T>.transform(
3434 @BuilderInference crossinline transform : suspend FlowCollector <R >.(value: T ) -> Unit
3535): Flow <R > = flow { // Note: safe flow is used here, because collector is exposed to transform on each operation
3636 collect { value ->
37- // kludge, without it Unit will be returned and TCE won't kick in, KT-28938
38- return @collect transform(value)
37+ transform(value)
3938 }
4039}
4140
@@ -45,8 +44,7 @@ internal inline fun <T, R> Flow<T>.unsafeTransform(
4544 @BuilderInference crossinline transform : suspend FlowCollector <R >.(value: T ) -> Unit
4645): Flow <R > = unsafeFlow { // Note: unsafe flow is used here, because unsafeTransform is only for internal use
4746 collect { value ->
48- // kludge, without it Unit will be returned and TCE won't kick in, KT-28938
49- return @collect transform(value)
47+ transform(value)
5048 }
5149}
5250
You can’t perform that action at this time.
0 commit comments