Skip to content

Commit 30a54aa

Browse files
committed
Rollup merge of rust-lang#27157 - steveklabnik:doc_std_io_iterators, r=alexcrichton
Make them all consistent and link up the documentation. r? @alexcrichton
2 parents 0715fe7 + 27fc0f2 commit 30a54aa

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

src/libstd/io/mod.rs

+28-11
Original file line numberDiff line numberDiff line change
@@ -1417,9 +1417,12 @@ impl<T: Write, U: Write> Write for Broadcast<T, U> {
14171417
}
14181418
}
14191419

1420-
/// Adaptor to chain together two instances of `Read`.
1420+
/// Adaptor to chain together two readers.
14211421
///
1422-
/// For more information, see `Read::chain`.
1422+
/// This struct is generally created by calling [`chain()`][chain] on a reader.
1423+
/// Please see the documentation of `chain()` for more details.
1424+
///
1425+
/// [chain]: trait.Read.html#method.chain
14231426
#[stable(feature = "rust1", since = "1.0.0")]
14241427
pub struct Chain<T, U> {
14251428
first: T,
@@ -1495,7 +1498,10 @@ impl<T: BufRead> BufRead for Take<T> {
14951498

14961499
/// An adaptor which will emit all read data to a specified writer as well.
14971500
///
1498-
/// For more information see `Read::tee`
1501+
/// This struct is generally created by calling [`tee()`][tee] on a reader.
1502+
/// Please see the documentation of `tee()` for more details.
1503+
///
1504+
/// [tee]: trait.Read.html#method.tee
14991505
#[unstable(feature = "io", reason = "awaiting stability of Read::tee")]
15001506
pub struct Tee<R, W> {
15011507
reader: R,
@@ -1512,9 +1518,12 @@ impl<R: Read, W: Write> Read for Tee<R, W> {
15121518
}
15131519
}
15141520

1515-
/// A bridge from implementations of `Read` to an `Iterator` of `u8`.
1521+
/// An iterator over `u8` values of a reader.
1522+
///
1523+
/// This struct is generally created by calling [`bytes()`][bytes] on a reader.
1524+
/// Please see the documentation of `bytes()` for more details.
15161525
///
1517-
/// See `Read::bytes` for more information.
1526+
/// [bytes]: trait.Read.html#method.bytes
15181527
#[stable(feature = "rust1", since = "1.0.0")]
15191528
pub struct Bytes<R> {
15201529
inner: R,
@@ -1534,9 +1543,12 @@ impl<R: Read> Iterator for Bytes<R> {
15341543
}
15351544
}
15361545

1537-
/// A bridge from implementations of `Read` to an `Iterator` of `char`.
1546+
/// An iterator over the `char`s of a reader.
15381547
///
1539-
/// See `Read::chars` for more information.
1548+
/// This struct is generally created by calling [`chars()`][chars] on a reader.
1549+
/// Please see the documentation of `chars()` for more details.
1550+
///
1551+
/// [chars]: trait.Read.html#method.chars
15401552
#[unstable(feature = "io", reason = "awaiting stability of Read::chars")]
15411553
pub struct Chars<R> {
15421554
inner: R,
@@ -1618,7 +1630,10 @@ impl fmt::Display for CharsError {
16181630
/// An iterator over the contents of an instance of `BufRead` split on a
16191631
/// particular byte.
16201632
///
1621-
/// See `BufRead::split` for more information.
1633+
/// This struct is generally created by calling [`split()`][split] on a
1634+
/// `BufRead`. Please see the documentation of `split()` for more details.
1635+
///
1636+
/// [split]: trait.BufRead.html#method.split
16221637
#[stable(feature = "rust1", since = "1.0.0")]
16231638
pub struct Split<B> {
16241639
buf: B,
@@ -1644,10 +1659,12 @@ impl<B: BufRead> Iterator for Split<B> {
16441659
}
16451660
}
16461661

1647-
/// An iterator over the lines of an instance of `BufRead` split on a newline
1648-
/// byte.
1662+
/// An iterator over the lines of an instance of `BufRead`.
1663+
///
1664+
/// This struct is generally created by calling [`lines()`][lines] on a
1665+
/// `BufRead`. Please see the documentation of `lines()` for more details.
16491666
///
1650-
/// See `BufRead::lines` for more information.
1667+
/// [lines]: trait.BufRead.html#method.lines
16511668
#[stable(feature = "rust1", since = "1.0.0")]
16521669
pub struct Lines<B> {
16531670
buf: B,

0 commit comments

Comments
 (0)