davidliu
Committed by GitHub

Have EventListenable.collect return Nothing (#458)

This indicates to linters that this will never return and can mark any code after it as unreachable.
@@ -30,6 +30,6 @@ interface EventListenable<out T> { @@ -30,6 +30,6 @@ interface EventListenable<out T> {
30 /** 30 /**
31 * @see [Flow.collect] 31 * @see [Flow.collect]
32 */ 32 */
33 -suspend inline fun <T> EventListenable<T>.collect(crossinline action: suspend (value: T) -> Unit) { 33 +suspend inline fun <T> EventListenable<T>.collect(crossinline action: suspend (value: T) -> Unit): Nothing {
34 events.collect { value -> action(value) } 34 events.collect { value -> action(value) }
35 } 35 }