You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If matches.opt_present is called with a not-defined option, that should either be a compile-time error (somehow) or it should return false; currently it panics instead.
The text was updated successfully, but these errors were encountered:
The current behaviour of panicking highlights an issue in the program itself where it's trying to find a value that'll never return true. I think this is maybe a little surprising but is a reasonable way to identify a possible bug.
We should note in the crate docs that the method will panic if it's given an option that doesn't exist.
If
matches.opt_present
is called with a not-defined option, that should either be a compile-time error (somehow) or it should return false; currently it panics instead.The text was updated successfully, but these errors were encountered: