mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-08 19:11:47 +01:00
with out keeper
This commit is contained in:
parent
997223eeaa
commit
59e59fd55d
@ -183,10 +183,7 @@ impl Downloader {
|
|||||||
let resp = reqwest::blocking::get(&archive_url)?;
|
let resp = reqwest::blocking::get(&archive_url)?;
|
||||||
let mut resp = resp.error_for_status()?;
|
let mut resp = resp.error_for_status()?;
|
||||||
let temp = NamedTempFile::new()?;
|
let temp = NamedTempFile::new()?;
|
||||||
let (file, path) = temp.keep()?;
|
let mut buf_writer = BufWriter::new(temp);
|
||||||
println!("path: {:?}", path);
|
|
||||||
|
|
||||||
let mut buf_writer = BufWriter::new(file);
|
|
||||||
let mut bytes = vec![];
|
let mut bytes = vec![];
|
||||||
let _ = resp.read_to_end(&mut bytes)?;
|
let _ = resp.read_to_end(&mut bytes)?;
|
||||||
buf_writer.write_all(bytes.as_slice())?;
|
buf_writer.write_all(bytes.as_slice())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user