You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a CompletableSubject which doesn't have toMaybe(). But I guess more broadly, CompletableSource is looser and doesn't actually require toMaybe() to exist and it seems consistent with the other overloads of Maybe.switchIfEmpty().
CompletableSubject extends Completable thus it has toMaybe, not sure why you have problems (maybe forgot to add the target type argument for the conversion?)
switchIfEmpty(Single) makes sense on its own as it return a Single expecting and implying there is going to be a success item or an error. Switching to a Completable doesn't change the return type and thus .toMaybe conversion won't introduce more conversions down the line like switchIfEmpty(Single.toMaybe()) would.
Ah okay we figured out what was going on on our end. Thanks for the context behind SingleSource, that makes sense. I'll close this one out as .toMaybe() isn't a problem. :)
In the same vein as #4544, can we get
Maybe.switchIfEmpty(CompletableSource)
? It would be identical tomaybe.switchIfEmpty(completable.toMaybe())
.The text was updated successfully, but these errors were encountered: