diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-10-12 18:27:04 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-10-12 18:27:04 +0200 |
| commit | 96a8bae3daadea1a4070ec50d8ae13bcb160188e (patch) | |
| tree | e6c62479c2171e4c4772ef15c017487e890cd9db /src/libstd | |
| parent | acb50e3481a06089dbd13d860dadc7d8d7cd1649 (diff) | |
| download | rust-96a8bae3daadea1a4070ec50d8ae13bcb160188e.tar.gz rust-96a8bae3daadea1a4070ec50d8ae13bcb160188e.zip | |
add missing urls for BufWriter and BufReader
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/buffered.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 93b2d34e27f..9a46cc803f8 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -21,11 +21,15 @@ use memchr; /// The `BufReader` struct adds buffering to any reader. /// -/// It can be excessively inefficient to work directly with a `Read` instance. -/// For example, every call to `read` on `TcpStream` results in a system call. -/// A `BufReader` performs large, infrequent reads on the underlying `Read` +/// It can be excessively inefficient to work directly with a [`Read`] instance. +/// For example, every call to [`read`] on [`TcpStream`] results in a system call. +/// A `BufReader` performs large, infrequent reads on the underlying [`Read`] /// and maintains an in-memory buffer of the results. /// +/// [`Read`]: ../../std/io/trait.Read.html +/// [`read`]: ../../std/net/struct.TcpStream.html#method.read +/// [`TcpStream`]: ../../std/net/struct.TcpStream.html +/// /// # Examples /// /// ``` @@ -255,7 +259,7 @@ impl<R: Seek> Seek for BufReader<R> { /// Wraps a writer and buffers its output. /// /// It can be excessively inefficient to work directly with something that -/// implements `Write`. For example, every call to `write` on `TcpStream` +/// implements [`Write`]. For example, every call to [`write`] on [`TcpStream`] /// results in a system call. A `BufWriter` keeps an in-memory buffer of data /// and writes it to an underlying writer in large, infrequent batches. /// @@ -263,7 +267,7 @@ impl<R: Seek> Seek for BufReader<R> { /// /// # Examples /// -/// Let's write the numbers one through ten to a `TcpStream`: +/// Let's write the numbers one through ten to a [`TcpStream`]: /// /// ```no_run /// use std::io::prelude::*; @@ -295,6 +299,10 @@ impl<R: Seek> Seek for BufReader<R> { /// By wrapping the stream with a `BufWriter`, these ten writes are all grouped /// together by the buffer, and will all be written out in one system call when /// the `stream` is dropped. +/// +/// [`Write`]: ../../std/io/trait.Write.html +/// [`write`]: ../../std/net/struct.TcpStream.html#method.write +/// [`TcpStream`]: ../../std/net/struct.TcpStream.html #[stable(feature = "rust1", since = "1.0.0")] pub struct BufWriter<W: Write> { inner: Option<W>, |
