Getting the program's first argument as a number
There's always multiple ways to solve a problem, but if we keep your function signature unchanged, I'd probably write something like:

use std::env;

fn limit_from_args(mut args: env::Args) -&gt; i32 {
    args.nth(1).and_then(|v| v.parse().ok()).unwrap_or(101)
}

fn main() {}


Notable things with your first solution:


There's no need to specify the String type when collecting; you can just use Vec&lt;_&gt;.
Since only one argument is needed, the code will be more efficient if that's all we look at. If there were thousands of arguments, there's no need to allocate space for 99% of them and then throw that away.
If you did have a slice or a vector, you can combine the range check and getting the value into one call with slice::get. This avoids the extra overhead of checking the index against the range:

match args.get(1) {
    Some(val) =&gt; ...,
    None =&gt; ...,
}

There's probably no need to specify the type for parse, it should be inferred from the return type.
Since the error codes are repeated, they should probably be extracted to a constant with a meaningful name. Even if they weren't repeated, 101 looks like a magic number.