File tree Expand file tree Collapse file tree 7 files changed +9
-9
lines changed
features/functions-and-methods Expand file tree Collapse file tree 7 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
10
10
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
11
11
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
12
12
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13
- refs/heads/auto: 9c303944a7c6767cd5cb708d25ffa27851fa994c
13
+ refs/heads/auto: 16a47c2d916ad51660d638b85e30125ac3f3fe53
14
14
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
15
15
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
16
16
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Original file line number Diff line number Diff line change @@ -63,4 +63,4 @@ for more details.
63
63
### The ` Result ` -` impl ` pattern [ FIXME]
64
64
65
65
> ** [ 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.
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ The primary exception: sometimes a function is meant to modify data
121
121
that the caller already owns , for example to re - use a buffer :
122
122
123
123
```rust
124
- fn read (& mut self , buf : & mut [u8 ]) -> IoResult <usize >
124
+ fn read (& mut self , buf : & mut [u8 ]) -> std :: io :: Result <usize >
125
125
```
126
126
127
127
(From the [Reader trait ](http : // static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ impl Command {
75
75
}
76
76
77
77
/// 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 > {
79
79
...
80
80
}
81
81
}
Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ x: &'a i32,
134
134
# }
135
135
```
136
136
137
- uses it. So why do we need a lifetime here? We need to ensure that any
138
- reference to the contained ` i32 ` does not outlive the containing ` Foo ` .
137
+ uses it. So why do we need a lifetime here? We need to ensure that any reference
138
+ to a ` Foo ` cannot outlive the reference to an ` i32 ` it contains .
139
139
140
140
## Thinking in scopes
141
141
Original file line number Diff line number Diff line change 164
164
//! provides some helper methods.
165
165
//!
166
166
//! 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!`
169
169
//! correctly (propagating errors upward).
170
170
//!
171
171
//! An example of implementing the formatting traits would look
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl StdRng {
95
95
/// appropriate.
96
96
///
97
97
/// 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.
99
99
pub fn new ( ) -> io:: Result < StdRng > {
100
100
OsRng :: new ( ) . map ( |mut r| StdRng { rng : r. gen ( ) } )
101
101
}
You can’t perform that action at this time.
0 commit comments