mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-03 18:50:02 +00:00
Rewrite AsyncExtracter
: Extract fmt logic as callback fn
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
d1033758a7
commit
7b52eaad5b
2 changed files with 128 additions and 108 deletions
|
@ -56,8 +56,8 @@ fn untar<Filter: FnMut(&Path) -> bool>(
|
|||
/// and only extract ones which filter returns `true`.
|
||||
/// Note that this is a best-effort and it only works when `fmt`
|
||||
/// is not `PkgFmt::Bin` or `PkgFmt::Zip`.
|
||||
pub(crate) fn extract_compressed_from_readable<Filter: FnMut(&Path) -> bool>(
|
||||
dat: impl BufRead,
|
||||
pub(crate) fn extract_compressed_from_readable<Filter: FnMut(&Path) -> bool, R: BufRead>(
|
||||
dat: R,
|
||||
fmt: PkgFmt,
|
||||
path: &Path,
|
||||
filter: Option<Filter>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue