Skip to content

Commit 12355ce

Browse files
authored
chore(race): remove specified generic type (hoc081098#197) [skip ci]
1 parent 2098080 commit 12355ce

File tree

1 file changed

+1
-2
lines changed
  • src/commonMain/kotlin/com/hoc081098/flowext

1 file changed

+1
-2
lines changed

src/commonMain/kotlin/com/hoc081098/flowext/race.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
package com.hoc081098.flowext
2626

2727
import kotlinx.coroutines.ExperimentalCoroutinesApi
28-
import kotlinx.coroutines.channels.ChannelResult
2928
import kotlinx.coroutines.channels.onFailure
3029
import kotlinx.coroutines.channels.onSuccess
3130
import kotlinx.coroutines.channels.produce
@@ -100,7 +99,7 @@ public fun <T> race(flows: Iterable<Flow<T>>): Flow<T> = flow {
10099
.singleOrNull()
101100
?.let { return@coroutineScope emitAll(it) }
102101

103-
val (winnerIndex, winnerResult) = select<Pair<Int, ChannelResult<T>>> {
102+
val (winnerIndex, winnerResult) = select {
104103
channels.forEachIndexed { index, channel ->
105104
channel.onReceiveCatching {
106105
index to it

0 commit comments

Comments
 (0)