Skip to content
Snippets Groups Projects
Commit a3cfd3f4 authored by Martin Larralde's avatar Martin Larralde
Browse files

Fix TRANSFAC parser unwrapping potential error in `lightmotif-io`

parent cd460572
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,10 @@ impl<B: BufRead, A: Alphabet> Iterator for Reader<B, A> {
}
if !self.buffer.is_empty() {
let record = super::parse::parse_record::<A>(&self.buffer).unwrap().1;
let record = match super::parse::parse_record::<A>(&self.buffer) {
Err(e) => return Some(Err(Error::from(e))),
Ok(x) => x.1,
};
self.buffer.clear();
self.last = 0;
Some(Ok(record))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment