mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +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
|
let checks = urls
|
||||||
.map(|url| {
|
.map(|url| {
|
||||||
let client = self.client.clone();
|
let client = self.client.clone();
|
||||||
AutoAbortJoinHandle::new(tokio::spawn(async move {
|
AutoAbortJoinHandle::spawn(async move {
|
||||||
let url = url?;
|
let url = url?;
|
||||||
info!("Checking for package at: '{url}'");
|
info!("Checking for package at: '{url}'");
|
||||||
remote_exists(client, url.clone(), Method::HEAD)
|
remote_exists(client, url.clone(), Method::HEAD)
|
||||||
.await
|
.await
|
||||||
.map(|exists| (url.clone(), exists))
|
.map(|exists| (url.clone(), exists))
|
||||||
}))
|
})
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue