about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-11-28 15:05:04 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-11-28 15:05:04 -0800
commitecc60106c9d95ce78205f689a662a52a0adeed6b (patch)
treeb7b3b7c7c686d4de3bab350c6f4075a7b5058922 /src/liballoc_system
parent0b399e5e99a44cf44d3860d353a8b7619d466410 (diff)
downloadrust-ecc60106c9d95ce78205f689a662a52a0adeed6b.tar.gz
rust-ecc60106c9d95ce78205f689a662a52a0adeed6b.zip
std: Fix partial writes in LineWriter
Previously the `LineWriter` could successfully write some bytes but then fail to
report that it has done so. Additionally, an erroneous flush after a successful
write was permanently ignored. This commit fixes these two issues by (a)
maintaining a `need_flush` flag to indicate whether a flush should be the first
operation in `LineWriter::write` and (b) avoiding returning an error once some
bytes have been successfully written.

Closes #37807
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions