Skip to content

Commit

Permalink
rephrase sentence regarding data loss when using BufReader::into_inner
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Conte committed Oct 31, 2019
1 parent 900c13e commit 5b5196a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ use crate::memchr;
///
/// When the `BufReader<R>` is dropped, the contents of its buffer will be
/// discarded. Creating multiple instances of a `BufReader<R>` on the same
/// stream can cause data loss, as well as reading from the underlying reader
/// after unwrapping the `BufReader<R>` instance with `BufReader<R>::into_inner()`.
/// stream can cause data loss. Reading from the underlying reader after
/// unwrapping the `BufReader<R>` with `BufReader::into_inner` can also cause
/// data loss.
///
/// [`Read`]: ../../std/io/trait.Read.html
/// [`TcpStream::read`]: ../../std/net/struct.TcpStream.html#method.read
Expand Down

0 comments on commit 5b5196a

Please sign in to comment.