Auto merge of #30053 - JIghtuse:master, r=steveklabnik
This commit is contained in:
commit
1805bba399
1 changed files with 1 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue