Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/bam/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,14 @@ impl Record {
if self.aux(tag).is_ok() {
return Err(Error::BamAuxTagAlreadyPresent);
}
self.push_aux_unchecked(tag, value)
}

/// Add auxiliary data, without checking if the tag is present.
///
/// The caller should ensure that the same tag is not pushed more than once.
/// This is provided as a performance optimization.
pub fn push_aux_unchecked(&mut self, tag: &[u8], value: Aux<'_>) -> Result<()> {
let ctag = tag.as_ptr() as *mut c_char;
let ret = unsafe {
match value {
Expand Down
Loading