Skip to content

extra::future cleanup and modernization#9285

Merged
bors merged 4 commits intorust-lang:masterfrom
sfackler:future
Sep 20, 2013
Merged

extra::future cleanup and modernization#9285
bors merged 4 commits intorust-lang:masterfrom
sfackler:future

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