Skip to content

Commit

Permalink
Clarified comment in partial_multiline_buffering test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretiel committed Jun 2, 2020
1 parent 38017a3 commit 59710fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2246,9 +2246,9 @@ mod tests {
// When content is written, LineWriter will try to write blocks A, B,
// C, and D. Only block A will succeed. Under the old behavior, LineWriter
// would then try to buffer B, C and D, but because its capacity is 10,
// it will only be able to buffer B and C. We don't want it to buffer
// partial lines if it can avoid it, so the correct behavior is to
// only buffer block B (with its newline).
// it will only be able to buffer B and C. We don't want to buffer
// partial lines concurrent with whole lines, so the correct behavior
// is to buffer only block B (out to the newline)
assert_eq!(writer.write(content).unwrap(), 11);
assert_eq!(writer.get_ref().buffer, *b"AAAAA");

Expand Down

0 comments on commit 59710fb

Please sign in to comment.