mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 11:40:04 +00:00
Rm fn helpers::download
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c9b0d45a24
commit
1879a719e4
1 changed files with 0 additions and 6 deletions
|
@ -51,12 +51,6 @@ pub async fn remote_exists(url: Url, method: Method) -> Result<bool, BinstallErr
|
||||||
Ok(req.status().is_success())
|
Ok(req.status().is_success())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Download a file from the provided URL to the provided path
|
|
||||||
pub async fn download<P: AsRef<Path>>(url: &str, path: P) -> Result<(), BinstallError> {
|
|
||||||
let url = Url::parse(url)?;
|
|
||||||
download_and_extract::<_, 0>(url, PkgFmt::Bin, path.as_ref(), None).await
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Download a file from the provided URL and extract it to the provided path
|
/// Download a file from the provided URL and extract it to the provided path
|
||||||
///
|
///
|
||||||
/// * `desired_outputs - If Some(_) and `fmt` is not `PkgFmt::Bin` or
|
/// * `desired_outputs - If Some(_) and `fmt` is not `PkgFmt::Bin` or
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue