We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
std::io::BufReader
1 parent 07d3508 commit ffaa5c9Copy full SHA for ffaa5c9
src/libstd/io/buffered.rs
@@ -21,6 +21,10 @@ use crate::memchr;
21
/// times. It also provides no advantage when reading from a source that is
22
/// already in memory, like a `Vec<u8>`.
23
///
24
+/// When the `BufReader` is dropped, the contents of its buffer will be
25
+/// discarded. Creating multiple instances of a `BufReader` on the same
26
+/// stream can cause data loss.
27
+///
28
/// [`Read`]: ../../std/io/trait.Read.html
29
/// [`TcpStream::read`]: ../../std/net/struct.TcpStream.html#method.read
30
/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
0 commit comments