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(
34
34
@BuilderInference crossinline transform : suspend FlowCollector <R >.(value: T ) -> Unit
35
35
): Flow <R > = flow { // Note: safe flow is used here, because collector is exposed to transform on each operation
36
36
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)
39
38
}
40
39
}
41
40
@@ -45,8 +44,7 @@ internal inline fun <T, R> Flow<T>.unsafeTransform(
45
44
@BuilderInference crossinline transform : suspend FlowCollector <R >.(value: T ) -> Unit
46
45
): Flow <R > = unsafeFlow { // Note: unsafe flow is used here, because unsafeTransform is only for internal use
47
46
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)
50
48
}
51
49
}
52
50
You can’t perform that action at this time.
0 commit comments