mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 03:11:24 +00:00
Remove unlooping loop
This commit is contained in:
parent
5e95c76a0f
commit
ef60ed9581
1 changed files with 6 additions and 8 deletions
|
@ -54,14 +54,12 @@ where
|
||||||
pub async fn make_progress_with<F: std::future::Future>(&mut self, f: F) -> F::Output {
|
pub async fn make_progress_with<F: std::future::Future>(&mut self, f: F) -> F::Output {
|
||||||
let mut f = std::pin::pin!(f);
|
let mut f = std::pin::pin!(f);
|
||||||
|
|
||||||
loop {
|
tokio::select! {
|
||||||
tokio::select! {
|
_ = self.make_progress() => {
|
||||||
_ = self.make_progress() => {
|
return f.await;
|
||||||
return f.await;
|
}
|
||||||
}
|
output = &mut f => {
|
||||||
output = &mut f => {
|
return output;
|
||||||
return output;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue