diff options
| author | bors <bors@rust-lang.org> | 2017-01-22 16:55:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-22 16:55:16 +0000 |
| commit | b79081c2eb7fe789f428ffcd20f49549c7ca84ea (patch) | |
| tree | 6312735bc66c44fcee2fb142fe73fad868af398c /src/libstd/io/error.rs | |
| parent | 9f705575452e04ce2d8cb88e5f5accdc4d54e650 (diff) | |
| parent | 19724d34d2b223f940363cc07aa83a8a530f8093 (diff) | |
| download | rust-b79081c2eb7fe789f428ffcd20f49549c7ca84ea.tar.gz rust-b79081c2eb7fe789f428ffcd20f49549c7ca84ea.zip | |
Auto merge of #38648 - utkarshkukreti:question-mark-in-libstd-documentation-examples, r=pnkfelix,steveklabnik,frewsxcvx
libstd: replace all `try!` with `?` in documentation examples
See #38644.
For the record, I used the following Perl one-liner and then manually fixed a couple of things it got wrong:
$ perl -p -i -e 's#(///.*)try!\((.*)\)#$1$2?#' src/libstd/**/*.rs
Diffstat (limited to 'src/libstd/io/error.rs')
| -rw-r--r-- | src/libstd/io/error.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 434f522cc1e..6d4da2e6a88 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -39,7 +39,7 @@ use convert::From; /// fn get_string() -> io::Result<String> { /// let mut buffer = String::new(); /// -/// try!(io::stdin().read_line(&mut buffer)); +/// io::stdin().read_line(&mut buffer)?; /// /// Ok(buffer) /// } |
