diff --git a/hammond-downloader/src/downloader.rs b/hammond-downloader/src/downloader.rs index 40d0055..b311b4a 100644 --- a/hammond-downloader/src/downloader.rs +++ b/hammond-downloader/src/downloader.rs @@ -44,7 +44,7 @@ pub fn download_to(target: &str, url: &str) -> Result<()> { let bcount = resp.read(&mut buffer[..]).unwrap(); buffer.truncate(bcount); if !buffer.is_empty() { - writer.write(buffer.as_slice()).unwrap(); + writer.write_all(buffer.as_slice()).unwrap(); } else { break; }