diff options
| author | bors <bors@rust-lang.org> | 2015-11-26 00:20:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-26 00:20:37 +0000 |
| commit | 1805bba399805d8fd8e85e23c31a0580f21533cb (patch) | |
| tree | 91687d720e26db8fd2228a5c4081ab607f77a4b2 | |
| parent | 498f08d36921b6b193cd4369138e5717a8dc930a (diff) | |
| parent | b892b5a6903adc2dfbdac793b9da1e9a0b575a40 (diff) | |
| download | rust-1805bba399805d8fd8e85e23c31a0580f21533cb.tar.gz rust-1805bba399805d8fd8e85e23c31a0580f21533cb.zip | |
Auto merge of #30053 - JIghtuse:master, r=steveklabnik
| -rw-r--r-- | src/doc/book/error-handling.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/doc/book/error-handling.md b/src/doc/book/error-handling.md index e37360a457b..af6846e65de 100644 --- a/src/doc/book/error-handling.md +++ b/src/doc/book/error-handling.md @@ -681,6 +681,7 @@ fn double_arg(mut argv: env::Args) -> Result<i32, String> { argv.nth(1) .ok_or("Please give at least one argument".to_owned()) .and_then(|arg| arg.parse::<i32>().map_err(|err| err.to_string())) + .map(|n| 2 * n) } fn main() { |
