Closed pokk closed 6 years ago
Hi @pokk ,
asSingle
works as expected, refer to docs:
The
asSingle
operator throws aRxError.noElements
orRxError.moreThanOneElement
if the source Observable does not emit exactly one element before successfully completing.
In order to make it work as you intend, you can add take(1)
before asSingle()
Please let me know if you have any other issues.
This is a good library!
Here is a problem about transforming from
Observable
toSingle
object. The code as following belowI don't know if my usage has problems or not. If I don't use
asSingle()
, it works well. I just learn swift a little, sorry that I still don't understand swift well. Just let you know there's a problem aboutasSingle()
. Thank you!