@@ -21,11 +21,15 @@ use memchr;
2121
2222/// The `BufReader` struct adds buffering to any reader.
2323///
24- /// It can be excessively inefficient to work directly with a `Read` instance.
25- /// For example, every call to `read` on `TcpStream` results in a system call.
26- /// A `BufReader` performs large, infrequent reads on the underlying `Read`
24+ /// It can be excessively inefficient to work directly with a [ `Read`] instance.
25+ /// For example, every call to [ `read`] on [ `TcpStream`] results in a system call.
26+ /// A `BufReader` performs large, infrequent reads on the underlying [ `Read`]
2727/// and maintains an in-memory buffer of the results.
2828///
29+ /// [`Read`]: ../../std/io/trait.Read.html
30+ /// [`read`]: ../../std/net/struct.TcpStream.html#method.read
31+ /// [`TcpStream`]: ../../std/net/struct.TcpStream.html
32+ ///
2933/// # Examples
3034///
3135/// ```
@@ -255,15 +259,15 @@ impl<R: Seek> Seek for BufReader<R> {
255259/// Wraps a writer and buffers its output.
256260///
257261/// It can be excessively inefficient to work directly with something that
258- /// implements `Write`. For example, every call to `write` on `TcpStream`
262+ /// implements [ `Write`] . For example, every call to [ `write`] on [ `TcpStream`]
259263/// results in a system call. A `BufWriter` keeps an in-memory buffer of data
260264/// and writes it to an underlying writer in large, infrequent batches.
261265///
262266/// The buffer will be written out when the writer is dropped.
263267///
264268/// # Examples
265269///
266- /// Let's write the numbers one through ten to a `TcpStream`:
270+ /// Let's write the numbers one through ten to a [ `TcpStream`] :
267271///
268272/// ```no_run
269273/// use std::io::prelude::*;
@@ -295,6 +299,10 @@ impl<R: Seek> Seek for BufReader<R> {
295299/// By wrapping the stream with a `BufWriter`, these ten writes are all grouped
296300/// together by the buffer, and will all be written out in one system call when
297301/// the `stream` is dropped.
302+ ///
303+ /// [`Write`]: ../../std/io/trait.Write.html
304+ /// [`write`]: ../../std/net/struct.TcpStream.html#method.write
305+ /// [`TcpStream`]: ../../std/net/struct.TcpStream.html
298306#[ stable( feature = "rust1" , since = "1.0.0" ) ]
299307pub struct BufWriter < W : Write > {
300308 inner : Option < W > ,
0 commit comments