diff options
| author | bors <bors@rust-lang.org> | 2013-11-01 09:36:25 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-01 09:36:25 -0700 |
| commit | 7cff3c74b8d313154379ab73f18baab57c09bd33 (patch) | |
| tree | bc38736b22804cf3f66ad2f80d2241e276b6003c /src/libstd/rt | |
| parent | 3a15482b9c602d162c6c26c36ab608eb1bef953d (diff) | |
| parent | 415a04315e660aa95473493d8031322f3cbd6bbe (diff) | |
| download | rust-7cff3c74b8d313154379ab73f18baab57c09bd33.tar.gz rust-7cff3c74b8d313154379ab73f18baab57c09bd33.zip | |
auto merge of #10119 : Kimundi/rust/option_and_generic, r=alexcrichton
This takes the last reforms on the `Option` type and applies them to `Result` too. For that, I reordered and grouped the functions in both modules, and also did some refactorings: - Added `as_ref` and `as_mut` adapters to `Result`. - Renamed `Result::map_move` to `Result::map` (same for `_err` variant), deleted other map functions. - Made the `.expect()` methods be generic over anything you can fail with. - Updated some doc comments to the line doc comment style - Cleaned up and extended standard trait implementations on `Option` and `Result` - Removed legacy implementations in the `option` and `result` module
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/io/stdio.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/io/stdio.rs b/src/libstd/rt/io/stdio.rs index 1284ab73656..fb1a3fac8d5 100644 --- a/src/libstd/rt/io/stdio.rs +++ b/src/libstd/rt/io/stdio.rs @@ -208,7 +208,7 @@ impl Reader for StdReader { fn read(&mut self, buf: &mut [u8]) -> Option<uint> { let ret = match self.inner { TTY(ref mut tty) => tty.read(buf), - File(ref mut file) => file.read(buf).map_move(|i| i as uint), + File(ref mut file) => file.read(buf).map(|i| i as uint), }; match ret { Ok(amt) => Some(amt as uint), |
