File tree 1 file changed +5
-1
lines changed
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> {
276
276
/// `BufWriter` keeps an in-memory buffer of data and writes it to an underlying
277
277
/// writer in large, infrequent batches.
278
278
///
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.
280
283
///
281
284
/// # Examples
282
285
///
@@ -316,6 +319,7 @@ impl<R: Seek> Seek for BufReader<R> {
316
319
/// [`Write`]: ../../std/io/trait.Write.html
317
320
/// [`Tcpstream::write`]: ../../std/net/struct.TcpStream.html#method.write
318
321
/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
322
+ /// [`flush`]: #method.flush
319
323
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
320
324
pub struct BufWriter < W : Write > {
321
325
inner : Option < W > ,
You can’t perform that action at this time.
0 commit comments