copy direct to disk

This commit is contained in:
quexeky
2024-10-25 14:56:49 +11:00
parent 2ec351f20e
commit a628fc1417
4 changed files with 15 additions and 10 deletions

View File

@ -37,7 +37,9 @@ pub fn download_game_chunk(ctx: DropDownloadContext) {
.expect("Failed to seek to file offset");
}
let mut stream = BufWriter::with_capacity(1024 * 1024, file);
// let mut stream = BufWriter::with_capacity(1024, file);
response.copy_to(&mut stream).unwrap();
response.copy_to(&mut file).unwrap();
// stream.flush().unwrap();
}