threadshare: runtime: simplify a function thanks to clippy

This commit is contained in:
François Laignel 2020-10-19 18:10:06 +02:00
parent 7c3e69bb4a
commit 4eacce80a5

View file

@ -632,8 +632,7 @@ impl Context {
} }
} }
pub fn drain_sub_tasks() -> impl Future<Output = SubTaskOutput> + Send + 'static { pub async fn drain_sub_tasks() -> SubTaskOutput {
async {
let (ctx, task_id) = match Context::current_task() { let (ctx, task_id) = match Context::current_task() {
Some(task) => task, Some(task) => task,
None => return Ok(()), None => return Ok(()),
@ -641,7 +640,6 @@ impl Context {
ctx.drain_sub_tasks_internal(task_id).await ctx.drain_sub_tasks_internal(task_id).await
} }
}
fn drain_sub_tasks_internal( fn drain_sub_tasks_internal(
&self, &self,