Skip to content

Commit 351f7b0

Browse files
committed
Fix incorrect error type in Read::byte docs
1 parent 8b22e70 commit 351f7b0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/libstd/io/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,10 @@ pub trait Read {
736736

737737
/// Transforms this `Read` instance to an [`Iterator`] over its bytes.
738738
///
739-
/// The returned type implements [`Iterator`] where the `Item` is [`Result`]`<`[`u8`]`,
740-
/// R::Err>`. The yielded item is [`Ok`] if a byte was successfully read and
741-
/// [`Err`] otherwise for I/O errors. EOF is mapped to returning [`None`] from
742-
/// this iterator.
739+
/// The returned type implements [`Iterator`] where the `Item` is
740+
/// [`Result`]`<`[`u8`]`, `[`io::Error`]>`.
741+
/// The yielded item is [`Ok`] if a byte was successfully read and [`Err`]
742+
/// otherwise. EOF is mapped to returning [`None`] from this iterator.
743743
///
744744
/// # Examples
745745
///
@@ -748,6 +748,7 @@ pub trait Read {
748748
/// [file]: ../fs/struct.File.html
749749
/// [`Iterator`]: ../../std/iter/trait.Iterator.html
750750
/// [`Result`]: ../../std/result/enum.Result.html
751+
/// [`io::Error``]: ../../std/io/struct.Error.html
751752
/// [`u8`]: ../../std/primitive.u8.html
752753
/// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok
753754
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err

0 commit comments

Comments
 (0)