Right now, using receive and receive_with_options panics on any error (for example, loss of network or socket unexpectedly closed), preventing graceful handling of them. Furthermore, it is impossible to use catch_unwind as the Subscription type is not unwind-safe.
It would make more sense to return a Result and let the library user deal with the handling (or revert to old behavior via .unwrap()/.except()).
Right now, using
receive
andreceive_with_options
panics on any error (for example, loss of network or socket unexpectedly closed), preventing graceful handling of them. Furthermore, it is impossible to usecatch_unwind
as theSubscription
type is not unwind-safe.It would make more sense to return a
Result
and let the library user deal with the handling (or revert to old behavior via.unwrap()
/.except()
).