Skip to content

Commit 621a10e

Browse files
committed
Auto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton
This is now std::io::Result
2 parents 9c30394 + 16a47c2 commit 621a10e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/doc/style/errors/ergonomics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ for more details.
6363
### The `Result`-`impl` pattern [FIXME]
6464

6565
> **[FIXME]** Document the way that the `io` module uses trait impls
66-
> on `IoResult` to painlessly propagate errors.
66+
> on `std::io::Result` to painlessly propagate errors.

src/doc/style/features/functions-and-methods/input.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The primary exception: sometimes a function is meant to modify data
121121
that the caller already owns, for example to re-use a buffer:
122122

123123
```rust
124-
fn read(&mut self, buf: &mut [u8]) -> IoResult<usize>
124+
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize>
125125
```
126126

127127
(From the [Reader trait](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)

src/doc/style/ownership/builders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Command {
7575
}
7676

7777
/// Executes the command as a child process, which is returned.
78-
pub fn spawn(&self) -> IoResult<Process> {
78+
pub fn spawn(&self) -> std::io::Result<Process> {
7979
...
8080
}
8181
}

src/libcollections/fmt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@
164164
//! provides some helper methods.
165165
//!
166166
//! Additionally, the return value of this function is `fmt::Result` which is a
167-
//! typedef to `Result<(), IoError>` (also known as `IoResult<()>`). Formatting
168-
//! implementations should ensure that they return errors from `write!`
167+
//! typedef to `Result<(), std::io::Error>` (also known as `std::io::Result<()>`).
168+
//! Formatting implementations should ensure that they return errors from `write!`
169169
//! correctly (propagating errors upward).
170170
//!
171171
//! An example of implementing the formatting traits would look

src/libstd/rand/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl StdRng {
9595
/// appropriate.
9696
///
9797
/// Reading the randomness from the OS may fail, and any error is
98-
/// propagated via the `IoResult` return value.
98+
/// propagated via the `io::Result` return value.
9999
pub fn new() -> io::Result<StdRng> {
100100
OsRng::new().map(|mut r| StdRng { rng: r.gen() })
101101
}

0 commit comments

Comments
 (0)