Auto merge of #30053 - JIghtuse:master, r=steveklabnik
This commit is contained in:
commit
1805bba399
@ -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…
x
Reference in New Issue
Block a user