File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ use crate::memchr;
2424///
2525/// When the `BufReader<R>` is dropped, the contents of its buffer will be
2626/// discarded. Creating multiple instances of a `BufReader<R>` on the same
27- /// stream can cause data loss.
27+ /// stream can cause data loss, as well as reading from the underlying reader
28+ /// after unwrapping the `BufReader<R>` instance with `BufReader<R>::into_inner()`.
2829///
2930/// [`Read`]: ../../std/io/trait.Read.html
3031/// [`TcpStream::read`]: ../../std/net/struct.TcpStream.html#method.read
@@ -179,7 +180,8 @@ impl<R> BufReader<R> {
179180
180181 /// Unwraps this `BufReader<R>`, returning the underlying reader.
181182 ///
182- /// Note that any leftover data in the internal buffer is lost.
183+ /// Note that any leftover data in the internal buffer is lost. Therefore,
184+ /// a following read from the underlying reader may lead to data loss.
183185 ///
184186 /// # Examples
185187 ///
You can’t perform that action at this time.
0 commit comments