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> {
/**
* @see [Flow.collect]
*/
suspend inline fun <T> EventListenable<T>.collect(crossinline action: suspend (value: T) -> Unit) {
suspend inline fun <T> EventListenable<T>.collect(crossinline action: suspend (value: T) -> Unit): Nothing {
events.collect { value -> action(value) }
}
... ...