mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Update crates/binstalk-fetchers/src/futures_resolver.rs
Co-authored-by: Félix Saparelli <felix@passcod.name> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
e03b625046
commit
fc0f4f3906
1 changed files with 6 additions and 6 deletions
|
@ -74,13 +74,13 @@ impl<T: Send + 'static, E: Send + Debug + 'static> FuturesResolver<T, E> {
|
|||
drop(self.tx);
|
||||
|
||||
async move {
|
||||
while let Some(res) = rx.recv().await {
|
||||
match res {
|
||||
Ok(ret) => return Some(ret),
|
||||
Err(err) => warn!(?err, "Fail to resolve the future"),
|
||||
}
|
||||
loop {
|
||||
match rx.recv().await {
|
||||
Some(Ok(ret)) => return Some(ret),
|
||||
Some(Err(err)) => warn!(?err, "Fail to resolve the future"),
|
||||
None => return None,
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue