Skip to content

Commit

Permalink
Fixed asConsumer signature
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanMcKee committed Apr 4, 2024
1 parent e67128e commit 17b9b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mvicore/src/main/java/com/badoo/mvicore/extension/Rx.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.reactivex.Observer
import io.reactivex.Scheduler
import io.reactivex.functions.Consumer

fun <T> Observer<T>.asConsumer() = Consumer<T> { onNext(it) }
fun <T : Any> Observer<T>.asConsumer() = Consumer<T> { onNext(it) }

internal fun <T> Observable<T>.subscribeOnNullable(scheduler: Scheduler?): Observable<T> =
if (scheduler != null) subscribeOn(scheduler) else this

0 comments on commit 17b9b68

Please sign in to comment.