mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 12:10:02 +00:00
Support for any PkgFmt
in AsyncFileWriter
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
58c775a648
commit
c3b5cb11c2
2 changed files with 50 additions and 24 deletions
|
@ -68,7 +68,7 @@ pub async fn download<P: AsRef<Path>>(url: &str, path: P) -> Result<(), Binstall
|
|||
debug!("Downloading to file: '{}'", path.display());
|
||||
|
||||
let mut bytes_stream = resp.bytes_stream();
|
||||
let mut writer = AsyncFileWriter::new(path);
|
||||
let mut writer = AsyncFileWriter::new(path, PkgFmt::Bin);
|
||||
|
||||
while let Some(res) = bytes_stream.next().await {
|
||||
writer.write(res?).await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue