mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-20 02:21:00 +00:00
threadshare: runtime: simplify a function thanks to clippy
This commit is contained in:
parent
7c3e69bb4a
commit
4eacce80a5
1 changed files with 6 additions and 8 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue