Closed
Description
It seems unclear to me from its documentation when exactly
std::io::LineWriter
will flush.
The documentation of the struct says that it flushes "whenever a
newline […] is detected", but the existence and documentation of the
constructor with_capacity
suggests that LineWriter
has an internal
buffer of some set capacity.
What happens if a line written to the LineWriter
exceeds the
capacity of the internal buffer? Can LineWriter
also flush before
a newline is detected?