-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use default value when option is passed #2172
Don't use default value when option is passed #2172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick review, I will address all comments tonight!
Thanks very much for the feedback - I've addressed it all and CI appears happy. Let me know if there's any other changes you'd like to see! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Build succeeded:
|
This PR changes
default_value
so that it does not apply for an option when the user passes the flag without a corresponding value. This case is now handled bydefault_missing_value
.(See also my discussion question #2083 where I understood that this is the expected behaviour.)
Consider this sample program:
With the current master, I get the following results of execution:
After this patch, everything works as expected: