Skip to content

Commit

Permalink
bam/lazy/record/quality_scores: Implement sam::alignment::record::Qua…
Browse files Browse the repository at this point in the history
…lityScores for QualityScores
  • Loading branch information
zaeleus committed Dec 14, 2023
1 parent e1dee24 commit 3e7a4a5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions noodles-bam/src/lazy/record/quality_scores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ impl<'a> QualityScores<'a> {
}
}

impl<'a> sam::alignment::record::QualityScores for QualityScores<'a> {
fn is_empty(&self) -> bool {
self.is_empty()
}

fn len(&self) -> usize {
self.len()
}

fn iter(&self) -> Box<dyn Iterator<Item = u8> + '_> {
Box::new(self.as_ref().iter().copied())
}
}

impl<'a> AsRef<[u8]> for QualityScores<'a> {
fn as_ref(&self) -> &[u8] {
self.0
Expand Down

0 comments on commit 3e7a4a5

Please sign in to comment.