Skip to content
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

Add Future::flatten #404

yoshuawuyts opened this issue Oct 28, 2019 · 3 comments


Copy link

@yoshuawuyts yoshuawuyts commented Oct 28, 2019

Similar to future-rs's Future::flatten method, this can sometimes come in useful.

However the only difference with it should be that we take IntoFuture as the trait bound, and call it under the hood. Because IntoFuture is implemented for Future this should work as expected.



let nested_future = async { async { 1 } };
let future = nested_future.flatten();
assert_eq!(future.await, 1);

This comment has been minimized.

Copy link

@portgasd666 portgasd666 commented Oct 31, 2019

I can take a stab at this


This comment has been minimized.

Copy link

@skade skade commented Oct 31, 2019

@portgasd666 go ahead!


This comment has been minimized.

Copy link

@k-nasa k-nasa commented Nov 11, 2019

This seems to have been resolved! by #443

@k-nasa k-nasa closed this Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.