Closed
Description
rust/src/libstd/io/buffered.rs
Line 662 in eeaf497
Suppose you had a BufWriter
with capacity 4. If you write b"1234"
to it, that will be flushed directly to the underlying stream, but if you write b"12"
and then b"34"
, those will be buffered. The unit tests confirm this behavior, but it seems surprising to me.