2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-03-04 00:59:40 +00:00

Fix BufWriter documentation: BufWriters do not flush when dropped.

This was partially fixed in #586, but there's another sentence later that makes
the same claim.
This commit is contained in:
Jim Blandy 2020-08-30 12:20:00 -07:00
parent bd297473cc
commit 949ff90306

View file

@ -74,7 +74,8 @@ pin_project! {
///
/// By wrapping the stream with a `BufWriter`, these ten writes are all grouped
/// together by the buffer, and will all be written out in one system call when
/// the `stream` is dropped.
/// `stream.flush()` completes. (As mentioned above, dropping a `BufWriter`
/// does not flush its buffers, so a `flush` call is essential.)
///
/// [`Write`]: trait.Write.html
/// [`TcpStream::write`]: ../net/struct.TcpStream.html#method.write