-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core::spawn should expect Error=Void not Error=() #197
Comments
Yes unfortunately there's no shared "void" type right now across these libraries. The This is something that we'll definitely want to evaluate for futures 0.2 |
What about using the |
I don't think we want to pull in another crate. Either way, changing the type will be a breaking change which requires a version bump. I think at this point, we'll be better off waiting for upcoming changes to rust-lang to hit stable. |
Just for reference, this is being discussed in If |
Indeed! |
Since
spawn
never looks at the results of the future, the return value ought to be completely devoid of any useful information to reduce the risk that the user might unintentionally forget about the result.The current choice of
Future<Item=(), Error=()>
still has one bit of information: it’s possible to distinguish betweenOk(())
andErr(())
results. It really ought to returnFuture<Item=(), Error=Void>
, which means theFuture
is guaranteed to succeed.It’s not a big problem by any means, just kind of quirky in my perspective.
The text was updated successfully, but these errors were encountered: