tokio::time::timeout should support std::future::IntoFuture #6665
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-time
Module: tokio/time
Tokio APIs don't currently support
std::future::IntoFuture
. In particulartokio::time::timeout
&timeout_at
.Example: timeout
So currently the future must be explicitly converted here to use
timeout
.Solution: Support
IntoFuture
If we updated the timeout method to:
The original example would work without the
.into_future()
explicit call.MSRV
Note: This requires bumping the msrv to 1.64 as this version stabilised IntoFuture.
The text was updated successfully, but these errors were encountered: