mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 21:18:42 +00:00
Use AutoAbortJoinHandle::spawn
in GhCrateMeta::find
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
5d315ae801
commit
36066fd4df
1 changed files with 2 additions and 2 deletions
|
@ -41,13 +41,13 @@ impl super::Fetcher for GhCrateMeta {
|
|||
let checks = urls
|
||||
.map(|url| {
|
||||
let client = self.client.clone();
|
||||
AutoAbortJoinHandle::new(tokio::spawn(async move {
|
||||
AutoAbortJoinHandle::spawn(async move {
|
||||
let url = url?;
|
||||
info!("Checking for package at: '{url}'");
|
||||
remote_exists(client, url.clone(), Method::HEAD)
|
||||
.await
|
||||
.map(|exists| (url.clone(), exists))
|
||||
}))
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue