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

fix: Panic on trailing omitted FORMAT records #417

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

fennerm
Copy link
Contributor

@fennerm fennerm commented Feb 1, 2024

Fix for #407

@fennerm fennerm changed the title Handle trailing omitted FORMAT records fix: Panic on trailing omitted FORMAT records Feb 1, 2024
@fennerm fennerm marked this pull request as ready for review February 1, 2024 19:30
@@ -1483,6 +1483,9 @@ impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Format<'a, B> {
/// memory.
pub fn string(mut self) -> Result<BufferBacked<'b, Vec<&'b [u8]>, B>> {
self.data(htslib::BCF_HT_STR).map(|ret| {
if ret == 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the behavior we want here. Could consider returning "." but then I guess we'd need to modify the buffer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty seems fine

@coveralls
Copy link

coveralls commented Feb 22, 2024

Pull Request Test Coverage Report for Build 8021006388

Details

  • 0 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 79.837%

Totals Coverage Status
Change from base Build 8010520476: 0.05%
Covered Lines: 2443
Relevant Lines: 3060

💛 - Coveralls

@johanneskoester johanneskoester merged commit 9f575ee into rust-bio:master Mar 27, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

3 participants