Skip to content

web search done right

if error happens in warcfile parse, dont panic

Mikkel Denker62a053c2b130
diff --git a/src/warc.rs b/src/warc.rs
index 04fa3428..396142df 100644
--- a/src/warc.rs
+++ b/src/warc.rs
@@ -283,7 +283,7 @@ impl<R: Read> Iterator for RecordIterator<R> {
fn next(&mut self) -> Option<Self::Item> {
if self.num_reads == 0 {
- self.next_raw().unwrap().unwrap(); // skip warc_info
+ self.next_raw()?.ok()?; // skip warc_info
}
self.num_reads += 1;