Remove redundant yield_now in Task::future
This commit is contained in:
parent
05c80aa312
commit
26dfcb6d42
1 changed files with 1 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue