Skip to content

Commit db89ed3

Browse files
ewelsclaude
andcommitted
chore(simplify): drop speculative BamWriter::header accessor
The `header()` method was added "for serial-write code paths that build records outside of `write_batch`" but no such caller exists; only the unit test used it. The test lives inside the same module so it can read the private `header` field directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3e93b0a commit db89ed3

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/io/bam.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ impl BamWriter {
7777
)
7878
}
7979

80-
/// Access the underlying SAM header (needed by serial-write code paths
81-
/// that build records outside of `write_batch`).
82-
pub fn header(&self) -> &sam::Header {
83-
&self.header
84-
}
85-
8680
/// Write batch of buffered records (for parallel processing)
8781
///
8882
/// # Arguments
@@ -244,7 +238,7 @@ mod tests {
244238

245239
// Header should contain exactly 1 @SQ entry (matching n_transcripts).
246240
let writer = writer.unwrap();
247-
assert_eq!(writer.header().reference_sequences().len(), 1);
241+
assert_eq!(writer.header.reference_sequences().len(), 1);
248242
}
249243

250244
#[test]

0 commit comments

Comments
 (0)