Refactor keep-drop parsing into function, better error handling. #93
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: projectmoon/tenebrous-dicebot#93
Loading…
Reference in New Issue
No description provided.
Delete Branch "keep-drop-refactoring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit refactors the keep-drop parsing into two separate functions: one for extracting keep-drop text, and one for actually doing something with the extracted values. An intermediate enum is introduced to contain extracted text, instead of relying on Ok/Err values directly for figuring out what to do with the values.
This allows us to express "this behavior is correct, and all others are not" instead of using a "fall back to secondary functionality" approach.