From 36066fd4df28b84aa2e434c8679bc37a9e26e9fd Mon Sep 17 00:00:00 2001
From: Jiahao XU <Jiahao_XU@outlook.com>
Date: Thu, 4 Aug 2022 18:33:35 +1000
Subject: [PATCH] Use `AutoAbortJoinHandle::spawn` in `GhCrateMeta::find`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---
 src/fetchers/gh_crate_meta.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fetchers/gh_crate_meta.rs b/src/fetchers/gh_crate_meta.rs
index 6375d7df..43603760 100644
--- a/src/fetchers/gh_crate_meta.rs
+++ b/src/fetchers/gh_crate_meta.rs
@@ -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<_>>();