Skip to content

extra::future cleanup and modernization #9285

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

Merged
merged 4 commits into from
Sep 20, 2013
Merged

Conversation

sfackler
Copy link
Member

The Drop implementation was used to prevent Future from being implicitly copyable. Since ~fns are no longer copyable, this is no longer needed. I added a cfail test to make sure that this is actually the case.

I method-ized all of the Future creation methods and added a new one, spawn_with, which is similar to task::spawn_with.

I also got rid of some unused imports in tests.

It was only there to prevent Future from being copyable, but it's
noncopyable anyways since it contains a ~fn.
@sfackler
Copy link
Member Author

@alexcrichton r? I missed a reference to future::from_fn in librustdoc.

bors added a commit that referenced this pull request Sep 20, 2013
The `Drop` implementation was used to prevent `Future` from being implicitly copyable. Since `~fn`s are no longer copyable, this is no longer needed. I added a cfail test to make sure that this is actually the case.

I method-ized all of the `Future` creation methods and added a new one, `spawn_with`, which is similar to `task::spawn_with`.

I also got rid of some unused imports in tests.
@bors bors merged commit 963707f into rust-lang:master Sep 20, 2013
@sfackler sfackler deleted the future branch May 15, 2014 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants