Skip to content

Commit

Permalink
Merge pull request #262 from arkivanov/optimize-serialized-emitters
Browse files Browse the repository at this point in the history
Optimized serialized emitters
  • Loading branch information
Arkadii Ivanov authored Oct 23, 2019
2 parents 5a1e3bb + 8f3876b commit 82fe12e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private class SerializedCompletableEmitter(
private val serializer =
serializer<Event> { event ->
when (event) {
is Event.OnComplete -> delegate.onComplete()
Event.OnComplete -> delegate.onComplete()
is Event.OnError -> delegate.onError(event.error)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private class SerializedObservableEmitter<T>(
serializer<Any?> { event ->
if (event is Event) {
when (event) {
is Event.OnComplete -> delegate.onComplete()
Event.OnComplete -> delegate.onComplete()
is Event.OnError -> delegate.onError(event.error)
}

Expand Down

0 comments on commit 82fe12e

Please sign in to comment.