Skip to content

Commit b3c688e

Browse files
committed
blanket impl for IntoFuture
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent 012f6b6 commit b3c688e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/future/into_future.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ pub trait IntoFuture {
1111
/// Create a future from a value
1212
fn into_future(self) -> Self::Future;
1313
}
14+
15+
impl<T: Future> IntoFuture for T {
16+
type Output = T::Output;
17+
18+
type Future = T;
19+
20+
fn into_future(self) -> Self::Future {
21+
self
22+
}
23+
}

0 commit comments

Comments
 (0)