Skip to content

Commit 88d1bfd

Browse files
committed
Only parse 'header' part of document
1 parent 2656257 commit 88d1bfd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

vcf/src/vcf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ pub fn parse_vcf(source: impl BufRead) -> Result<VCF, VCFError> {
157157
_ => panic!(),
158158
};
159159
let formats = lines
160+
.take_while(|s| match s { Ok(s) => s.starts_with("##"), _ => true})
160161
.map(
161162
|result| match result {
162163
Ok(ref line) => Header::parse(line).map_err(VCFError::from),

0 commit comments

Comments
 (0)