mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-13 15:30:03 +00:00
Refactor: Extract download_and_extract_with_filter
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
1d139324c7
commit
62be22256b
4 changed files with 18 additions and 6 deletions
|
@ -40,8 +40,7 @@ impl super::Fetcher for QuickInstall {
|
|||
async fn fetch_and_extract(&self, dst: &Path) -> Result<(), BinstallError> {
|
||||
let url = self.package_url();
|
||||
info!("Downloading package from: '{url}'");
|
||||
download_and_extract::<fn(&Path) -> bool, _>(Url::parse(&url)?, self.pkg_fmt(), dst, None)
|
||||
.await
|
||||
download_and_extract(Url::parse(&url)?, self.pkg_fmt(), dst).await
|
||||
}
|
||||
|
||||
fn pkg_fmt(&self) -> PkgFmt {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue