mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 04:00:02 +00:00
Rewrite untar
to take a visitor & simplify
signature of `download_and_extract_with_filter` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
5a43ee2681
commit
90a96cabc9
4 changed files with 64 additions and 38 deletions
|
@ -114,7 +114,7 @@ pub async fn fetch_crate_cratesio(
|
|||
Url::parse(&crate_url)?,
|
||||
TarBasedFmt::Tgz,
|
||||
&temp_dir,
|
||||
Some(move |path: &Path| path == cargo_toml || path == main || path.starts_with(&bin)),
|
||||
move |path: &Path| path == cargo_toml || path == main || path.starts_with(&bin),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue