The ResponseStream::to_writer function does not check the return value from writer.write(chunk.as_ref()).await?. This could result in data getting lost if a chunk is only partially written to the recieving stream and was picked up by the clippy::unused_io_amount lint.
The
ResponseStream::to_writer
function does not check the return value fromwriter.write(chunk.as_ref()).await?
. This could result in data getting lost if a chunk is only partially written to the recieving stream and was picked up by theclippy::unused_io_amount
lint.https://github.com/paperclip-rs/paperclip/blob/db3b920d6b8738bf5d1aa1d4701e3e74d05afd46/src/build/util_mod.hbs#L30-L40
The best solution is probably to replace
write
withwrite_all
to ensure that the full buffer gets written. I'm happy to make a PR for that change.