Skip to content

Commit

Permalink
bam/io/reader: Use records iterator instead of record buffers iterato…
Browse files Browse the repository at this point in the history
…r for alignment records

See #313.
  • Loading branch information
zaeleus committed Dec 12, 2024
1 parent d2b2cee commit 506989e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions noodles-bam/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

### Changed

* bam/io/reader: Use records iterator instead of record buffers iterator for
alignment records ([#313]).

* bam/record/sequence: Increase the visibility of `Iter`.

`Sequence::iter` now returns `Iter` instead of an implementation of
`Iterator.`

[#313]: https://github.com/zaeleus/noodles/discussions/313

## 0.70.0 - 2024-11-07

### Changed
Expand Down
4 changes: 2 additions & 2 deletions noodles-bam/src/io/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ where

fn alignment_records<'a>(
&'a mut self,
header: &'a sam::Header,
_header: &'a sam::Header,
) -> Box<dyn Iterator<Item = io::Result<Box<dyn sam::alignment::Record>>> + 'a> {
Box::new(
self.record_bufs(header).map(|result| {
self.records().map(|result| {
result.map(|record| Box::new(record) as Box<dyn sam::alignment::Record>)
}),
)
Expand Down

0 comments on commit 506989e

Please sign in to comment.