Skip to content

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.

2 participants