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
|
where
|
||||||
T: 'static,
|
T: 'static,
|
||||||
{
|
{
|
||||||
Self::stream(stream::once(async {
|
Self::stream(stream::once(future))
|
||||||
yield_now().await;
|
|
||||||
future.await
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new [`Task`] that runs the given [`Stream`] and produces
|
/// Creates a new [`Task`] that runs the given [`Stream`] and produces
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue