Open
Description
If compound extensions do make their way into Kotlin, we could leverage them nicely in AutoDispose to do something like this:
fun <T> ScopeProvider.Observable<T>.autoDispose() {
// ...
}
fun test(scope: ScopeProvider) = scope.apply {
myObservable
.autoDisposable()
.subscribe()
}
// or
class Worker : ScopeProvider {
fun run() {
workObservable
.autoDisposable()
.subscribe()
}
}