Remove redundant yield_now in Task::future

This commit is contained in:
Héctor Ramón Jiménez 2025-10-24 09:07:13 +02:00
parent 05c80aa312
commit 26dfcb6d42
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -259,10 +259,7 @@ impl<T> Task<T> {
where
T: 'static,
{
Self::stream(stream::once(async {
yield_now().await;
future.await
}))
Self::stream(stream::once(future))
}
/// Creates a new [`Task`] that runs the given [`Stream`] and produces