Skip to content

Commit 5b5196a

Browse files
author
Marco Conte
committed
rephrase sentence regarding data loss when using BufReader::into_inner
1 parent 900c13e commit 5b5196a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libstd/io/buffered.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ 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, as well as reading from the underlying reader
28-
/// after unwrapping the `BufReader<R>` instance with `BufReader<R>::into_inner()`.
27+
/// stream can cause data loss. Reading from the underlying reader after
28+
/// unwrapping the `BufReader<R>` with `BufReader::into_inner` can also cause
29+
/// data loss.
2930
///
3031
/// [`Read`]: ../../std/io/trait.Read.html
3132
/// [`TcpStream::read`]: ../../std/net/struct.TcpStream.html#method.read

0 commit comments

Comments
 (0)