> might make sense to create a wrapping class t...
# coroutines
g
might make sense to create a wrapping class that encapsulates the error / sucess
@Paul Woitaschek I use this approach for my coroutine wrapper for Retrofit: https://github.com/gildor/kotlin-coroutines-retrofit#awaitresult
.await
returns sealed class Result
p
gildor: It might make sense to change all your
T
T : Any
g
I think
T : Any
make sense for RxJava2, where you cannot use
null
as result, but for Retrofit you can easily write an adaptor that returns something in one case and null in another, actually even
json
allow you to use null as top level answer. So <T : Any> can broke some use cases