diff options
author | François Laignel <fengalin@free.fr> | 2020-10-19 19:10:06 +0300 |
---|---|---|
committer | François Laignel <fengalin@free.fr> | 2020-10-21 00:45:01 +0300 |
commit | 4eacce80a58206a61da7b15985e9250fdd34aa23 (patch) | |
tree | f3f1b7e97a2da93976e092b975f7474df9279b1d /generic/threadshare/src | |
parent | 7c3e69bb4aba6e3a5da95e3c610b85d5b629fb72 (diff) |
threadshare: runtime: simplify a function thanks to clippy
Diffstat (limited to 'generic/threadshare/src')
-rw-r--r-- | generic/threadshare/src/runtime/executor.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/threadshare/src/runtime/executor.rs b/generic/threadshare/src/runtime/executor.rs index 2b0c6f361..b8c2e01f6 100644 --- a/generic/threadshare/src/runtime/executor.rs +++ b/generic/threadshare/src/runtime/executor.rs @@ -632,15 +632,13 @@ impl Context { } } - pub fn drain_sub_tasks() -> impl Future<Output = SubTaskOutput> + Send + 'static { - async { - let (ctx, task_id) = match Context::current_task() { - Some(task) => task, - None => return Ok(()), - }; + pub async fn drain_sub_tasks() -> SubTaskOutput { + let (ctx, task_id) = match Context::current_task() { + Some(task) => task, + None => return Ok(()), + }; - ctx.drain_sub_tasks_internal(task_id).await - } + ctx.drain_sub_tasks_internal(task_id).await } fn drain_sub_tasks_internal( |