@@ -15,22 +15,28 @@ use cmp;
15
15
use io:: { self , SeekFrom , Error , ErrorKind } ;
16
16
17
17
/// A `Cursor` wraps another type and provides it with a
18
- /// [`Seek`](trait.Seek.html) implementation.
18
+ /// [`Seek`] implementation.
19
19
///
20
- /// Cursors are typically used with in-memory buffers to allow them to
21
- /// implement `Read` and/or `Write`, allowing these buffers to be used
20
+ /// `Cursor`s are typically used with in-memory buffers to allow them to
21
+ /// implement [ `Read`] and/or [ `Write`] , allowing these buffers to be used
22
22
/// anywhere you might use a reader or writer that does actual I/O.
23
23
///
24
24
/// The standard library implements some I/O traits on various types which
25
- /// are commonly used as a buffer, like `Cursor<Vec<u8>>` and `Cursor<&[u8]>`.
25
+ /// are commonly used as a buffer, like `Cursor<`[`Vec`]`<u8>>` and
26
+ /// `Cursor<`[`&[u8]`]`>`.
26
27
///
27
28
/// # Examples
28
29
///
29
- /// We may want to write bytes to a [`File`][file] in our production
30
+ /// We may want to write bytes to a [`File`] in our production
30
31
/// code, but use an in-memory buffer in our tests. We can do this with
31
32
/// `Cursor`:
32
33
///
33
- /// [file]: ../fs/struct.File.html
34
+ /// [`Seek`]: trait.Seek.html
35
+ /// [`Read`]: ../../std/io/trait.Read.html
36
+ /// [`Write`]: ../../std/io/trait.Write.html
37
+ /// [`Vec`]: ../../std/vec/struct.Vec.html
38
+ /// [`&[u8]`]: ../../std/primitive.slice.html
39
+ /// [`File`]: ../fs/struct.File.html
34
40
///
35
41
/// ```no_run
36
42
/// use std::io::prelude::*;
0 commit comments