Apply cargo fmt

This commit is contained in:
Jiahao XU 2024-06-22 05:40:40 +00:00
parent 615779187c
commit 2aeaa32c68
2 changed files with 8 additions and 6 deletions

View file

@ -1,7 +1,7 @@
use std::{future::Future, pin::Pin, fmt::Debug};
use std::{fmt::Debug, future::Future, pin::Pin};
use tracing::warn;
use tokio::sync::mpsc;
use tracing::warn;
/// Given multiple futures with output = `Result<Option<T>, E>`,
/// returns the the first one that returns either `Err(_)` or
@ -73,7 +73,7 @@ impl<T: Send + 'static, E: Send + Debug + 'static> FuturesResolver<T, E> {
let mut rx = self.rx;
drop(self.tx);
async move {
async move {
while let Some(res) = rx.recv().await {
match res {
Ok(ret) => return Some(ret),

View file

@ -139,8 +139,7 @@ async fn resolve_inner(
target_data,
opts.signature_policy,
);
filter_fetcher_by_name_predicate(fetcher.fetcher_name())
.then_some(fetcher)
filter_fetcher_by_name_predicate(fetcher.fetcher_name()).then_some(fetcher)
}),
)
};
@ -167,7 +166,10 @@ async fn resolve_inner(
for fetcher in handles {
fetcher.clone().report_to_upstream();
match AutoAbortJoinHandle::new(fetcher.clone().find()).flattened_join().await {
match AutoAbortJoinHandle::new(fetcher.clone().find())
.flattened_join()
.await
{
Ok(true) => {
// Generate temporary binary path
let bin_path = opts.temp_dir.join(format!(