From 8f3876bad5a060188bb1ab77fb269dc5895fd93f Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Thu, 24 Oct 2019 00:15:47 +0100 Subject: [PATCH] Optimized serialized emitters --- .../badoo/reaktive/completable/CompletableEmitterSerialize.kt | 2 +- .../com/badoo/reaktive/observable/ObservableEmitterSerialize.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reaktive/src/commonMain/kotlin/com/badoo/reaktive/completable/CompletableEmitterSerialize.kt b/reaktive/src/commonMain/kotlin/com/badoo/reaktive/completable/CompletableEmitterSerialize.kt index 6619f5aae..69a24d853 100644 --- a/reaktive/src/commonMain/kotlin/com/badoo/reaktive/completable/CompletableEmitterSerialize.kt +++ b/reaktive/src/commonMain/kotlin/com/badoo/reaktive/completable/CompletableEmitterSerialize.kt @@ -12,7 +12,7 @@ private class SerializedCompletableEmitter( private val serializer = serializer { event -> when (event) { - is Event.OnComplete -> delegate.onComplete() + Event.OnComplete -> delegate.onComplete() is Event.OnError -> delegate.onError(event.error) } diff --git a/reaktive/src/commonMain/kotlin/com/badoo/reaktive/observable/ObservableEmitterSerialize.kt b/reaktive/src/commonMain/kotlin/com/badoo/reaktive/observable/ObservableEmitterSerialize.kt index f7a5f957d..2850538d5 100644 --- a/reaktive/src/commonMain/kotlin/com/badoo/reaktive/observable/ObservableEmitterSerialize.kt +++ b/reaktive/src/commonMain/kotlin/com/badoo/reaktive/observable/ObservableEmitterSerialize.kt @@ -13,7 +13,7 @@ private class SerializedObservableEmitter( serializer { event -> if (event is Event) { when (event) { - is Event.OnComplete -> delegate.onComplete() + Event.OnComplete -> delegate.onComplete() is Event.OnError -> delegate.onError(event.error) }