2.0.0-alpha.12
Pre-releaseThis is a pre-release. It can contain bugs and significant changes which are not yet finalized. Changes may appear without notice. We recommend to try the pre-releases to learn about upcoming features. For important projects, use stable releases. |
---|
Commit history
(click to expand)
- [
5254aac
] fix: don't treat a lack of extension as error
After transparent compression was introduced, file extension extraction function extension()
was implemented such that it fails when there is no file extension.
When gradually removing extensions from compressed files like .fasta.gz
there are 2 calls tomade extension()
, which correctly detect 2 extensions. However, it was failing on plain .fasta
files, because after a single extension was removed there wasn't any more.
Here I chose to treat lack of extension as not an error. extension()
now returns an Option<String>
, and when there's no extension it returns None
. The calling code is updated accordingly.
If there's a situation when we need to fail on lack of file extension, then the Option
can be converted to an error in the calling code or we might introduce another version of this function.