Tweak parse_opt_uint.
Don't set `slot` on failure, like all the other `parse_*` functions.
This commit is contained in:
parent
7ec7b572a9
commit
3093018474
1 changed files with 1 additions and 1 deletions
|
|
@ -421,7 +421,7 @@ macro_rules! options {
|
|||
fn parse_opt_uint(slot: &mut Option<usize>, v: Option<&str>) -> bool {
|
||||
match v {
|
||||
Some(s) => { *slot = s.parse().ok(); slot.is_some() }
|
||||
None => { *slot = None; false }
|
||||
None => false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue