quinn icon indicating copy to clipboard operation
quinn copied to clipboard

`write_chunks` vs. `write_chunk` naming scheme hazard

Open gretchenfrage opened this issue 5 months ago • 0 comments

SendStream::write_chunks writes some prefix of the bytes provided as an array of Bytes.

SendStream::write_all_chunks repeatedly writes until the entirety of the array of provided Bytes are written.

Based on this pattern, can you guess what SendStream::write_chunk, which takes a single Bytes, does?

If you guessed that it would write some prefix of it, you'd be wrong. It repeatedly writes until the entirety of the provided bytes are written.

gretchenfrage avatar May 10 '25 17:05 gretchenfrage