From 26dfcb6d42a5cdd38ef0f75000484eaf4693f89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 24 Oct 2025 09:07:13 +0200 Subject: [PATCH] Remove redundant `yield_now` in `Task::future` --- runtime/src/task.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runtime/src/task.rs b/runtime/src/task.rs index 39166593..0ed78b54 100644 --- a/runtime/src/task.rs +++ b/runtime/src/task.rs @@ -259,10 +259,7 @@ impl Task { 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