Refactor keep-drop parsing into function, better error handling. #93

Merged
projectmoon merged 2 commits from keep-drop-refactoring into master 2021-09-30 21:16:04 +00:00

2 Commits

Author SHA1 Message Date
projectmoon ef5b4cb69b Potentially valid, not always valid.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-09-26 23:19:51 +00:00
projectmoon 0cb48bea07 Refactor keep-drop parsing into function, better error handling.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
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.
2021-09-26 23:09:24 +00:00