mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 12:10:02 +00:00
Return a list of files written to disk in binstalk_downloader::download::Download::and_extract
(#856)
to avoid collecting extracted files from disk again in resolution stage. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
44ac63ce0d
commit
9c7da6a179
10 changed files with 366 additions and 84 deletions
|
@ -8,7 +8,10 @@ use url::Url;
|
|||
|
||||
use crate::{
|
||||
errors::BinstallError,
|
||||
helpers::{gh_api_client::GhApiClient, remote::Client, tasks::AutoAbortJoinHandle},
|
||||
helpers::{
|
||||
download::ExtractedFiles, gh_api_client::GhApiClient, remote::Client,
|
||||
tasks::AutoAbortJoinHandle,
|
||||
},
|
||||
manifests::cargo_toml_binstall::{PkgFmt, PkgMeta},
|
||||
};
|
||||
|
||||
|
@ -29,7 +32,7 @@ pub trait Fetcher: Send + Sync {
|
|||
Self: Sized;
|
||||
|
||||
/// Fetch a package and extract
|
||||
async fn fetch_and_extract(&self, dst: &Path) -> Result<(), BinstallError>;
|
||||
async fn fetch_and_extract(&self, dst: &Path) -> Result<ExtractedFiles, BinstallError>;
|
||||
|
||||
/// Find the package, if it is available for download
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue