if you're on android and care about allocations, h...
# rx
k
if you're on android and care about allocations, here's the version with minimal garbage:
Copy code
val EMPTY_FUN: (Any) -> Unit = {}

inline fun Observable<*>.insertNameHere(
        crossinline onSuccess: () -> Unit,
        crossinline onError: (Throwable) -> Unit
): Subscription {
    return subscribe(EMPTY_FUN, { onError(it) }, { onSuccess() })
}