-
Notifications
You must be signed in to change notification settings - Fork 342
Closed
Labels
api designOpen design questionsOpen design questionsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
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.
Thanks!
Examples
let nested_future = async { async { 1 } };
let future = nested_future.flatten();
assert_eq!(future.await, 1);
Metadata
Metadata
Assignees
Labels
api designOpen design questionsOpen design questionsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers