Skip to content
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

Introduce new type for policy on how to handle overwrite questions #124

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

AntonHermann
Copy link
Contributor

Currently, the handling of whether to ask questions and if not how to answer them currently uses

skip_questions_positively: Option<bool>

From this alone, it isn't obvious what the possible values mean. Is None a no? Does Some(false) mean not to skip questions positively? This still is not the same as skipping them negatively.

I think introducing a new enum here makes this more clear:

enum QuestionPolicy {Ask, AlwaysYes, AlwaysNo}

makes it obious what is supposed to happen and in my opinion the code more readable.

@marcospb19 marcospb19 added the enhancement New feature or request label Oct 21, 2021
@marcospb19
Copy link
Member

Awesome, I 100% agree, thanks!

@marcospb19 marcospb19 merged commit 4cfc7b9 into ouch-org:master Oct 21, 2021
@marcospb19 marcospb19 added the hacktoberfest-accepted Tag PR as accepted for the hacktoberfest event label Oct 21, 2021
@AntonHermann AntonHermann deleted the introduce_question_policy branch October 22, 2021 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest-accepted Tag PR as accepted for the hacktoberfest event
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants