codegen: Tweak code around BufWriter

This commit is contained in:
Taiki Endo
2025-02-11 18:40:20 +09:00
parent dd213e8db4
commit 771bd4fef9
2 changed files with 8 additions and 4 deletions

View File

@@ -319,7 +319,7 @@ fn main() -> Result<()> {
if download_cache.is_file() {
eprintln!("already downloaded");
fs::File::open(download_cache)?.read_to_end(&mut buf)?;
fs::File::open(download_cache)?.read_to_end(&mut buf)?; // Not buffered because it is read at once.
} else {
response.into_body().into_reader().read_to_end(&mut buf)?;
eprintln!("download complete");