2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-29 16:55:34 +00:00

Merge pull request #869 from jimblandy/buf-writer-doc-fix

Fix BufWriter documentation: BufWriters do not flush when dropped.
This commit is contained in:
Friedel Ziegelmayer 2020-09-14 14:46:43 +02:00 committed by GitHub
commit 6a6623cfad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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