You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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
vsAtgError:InavildInput
.Callers could then handle these errors properly.
This improvements depends on #11
The text was updated successfully, but these errors were encountered: