File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,10 @@ impl<R: Seek> Seek for BufReader<R> {
276276/// `BufWriter` keeps an in-memory buffer of data and writes it to an underlying
277277/// writer in large, infrequent batches.
278278///
279- /// The buffer will be written out when the writer is dropped.
279+ /// When the `BufWriter` is dropped, the contents of its buffer will be written
280+ /// out. However, any errors that happen in the process of flushing the buffer
281+ /// when the writer is dropped will be ignored. Code that wishes to handle such
282+ /// errors must manually call [`flush`] before the writer is dropped.
280283///
281284/// # Examples
282285///
@@ -316,6 +319,7 @@ impl<R: Seek> Seek for BufReader<R> {
316319/// [`Write`]: ../../std/io/trait.Write.html
317320/// [`Tcpstream::write`]: ../../std/net/struct.TcpStream.html#method.write
318321/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
322+ /// [`flush`]: #method.flush
319323#[ stable( feature = "rust1" , since = "1.0.0" ) ]
320324pub struct BufWriter < W : Write > {
321325 inner : Option < W > ,
You can’t perform that action at this time.
0 commit comments