We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec5250 commit 49fa4afCopy full SHA for 49fa4af
src/main/kotlin/io/reactivex/rxkotlin3/subscribers.kt
@@ -135,9 +135,4 @@ fun <T : Any> Single<T>.blockingSubscribeBy(
135
fun Completable.blockingSubscribeBy(
136
onError: (Throwable) -> Unit = onErrorStub,
137
onComplete: () -> Unit = onCompleteStub
138
-): Disposable = when {
139
- // There are optimized versions of the completable Consumers, so we need to use the subscribe overloads here.
140
- onError === onErrorStub && onComplete === onCompleteStub -> subscribe()
141
- onError === onErrorStub -> subscribe(onComplete)
142
- else -> subscribe(onComplete.asOnCompleteAction(), Consumer(onError))
143
-}
+): Unit = blockingSubscribe(onComplete.asOnCompleteAction(), onError.asOnErrorConsumer())
0 commit comments