Refactor: Extract download_and_extract_with_filter

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-10 16:37:48 +10:00
parent 1d139324c7
commit 62be22256b
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
4 changed files with 18 additions and 6 deletions

View file

@ -43,7 +43,7 @@ impl super::Fetcher for GhCrateMeta {
async fn fetch_and_extract(&self, dst: &Path) -> Result<(), BinstallError> {
let url = self.url()?;
info!("Downloading package from: '{url}'");
download_and_extract::<fn(&Path) -> bool, _>(url, self.pkg_fmt(), dst, None).await
download_and_extract(url, self.pkg_fmt(), dst).await
}
fn pkg_fmt(&self) -> PkgFmt {