diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-11-28 15:05:04 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-11-28 15:05:04 -0800 |
| commit | ecc60106c9d95ce78205f689a662a52a0adeed6b (patch) | |
| tree | b7b3b7c7c686d4de3bab350c6f4075a7b5058922 /src/liballoc_system | |
| parent | 0b399e5e99a44cf44d3860d353a8b7619d466410 (diff) | |
| download | rust-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
