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

Code improvement: Remove panic from Nucleotide::try_from<char> #12

Open
anergictcell opened this issue Sep 22, 2022 · 0 comments
Open

Comments

@anergictcell
Copy link
Owner

The Nucleotide::try_from methods are not really correct in that they return an error for newline characters and panic on other invalid input.
The functions should be changed to return Errors in both cases, but different error types, e.g. AtgError::NewlineInInput vs AtgError:InavildInput.
Callers could then handle these errors properly.

This improvements depends on #11

@anergictcell anergictcell changed the title Code Improvement: Remove panic from Nucleotide::try_from<char> Code improvement: Remove panic from Nucleotide::try_from<char> Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant