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;
24
24
///
25
25
/// When the `BufReader<R>` is dropped, the contents of its buffer will be
26
26
/// 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()`.
28
29
///
29
30
/// [`Read`]: ../../std/io/trait.Read.html
30
31
/// [`TcpStream::read`]: ../../std/net/struct.TcpStream.html#method.read
@@ -179,7 +180,8 @@ impl<R> BufReader<R> {
179
180
180
181
/// Unwraps this `BufReader<R>`, returning the underlying reader.
181
182
///
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.
183
185
///
184
186
/// # Examples
185
187
///
You can’t perform that action at this time.
0 commit comments