diff options
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index bbf4b70..6b67875 100644 --- a/src/main.rs +++ b/src/main.rs @@ -294,9 +294,10 @@ fn search_log(entry: &DirEntry, opt: &Opt) -> Result<Option<LogResult>> { .to_str() .map(|n| n.ends_with(".zip") || n.ends_with(".zevtc")) .unwrap_or(false); - let mut wrapper = match is_zip { - false => ZipWrapper::raw(file_stream), - true => ZipWrapper::zipped(file_stream), + let mut wrapper = if is_zip { + ZipWrapper::zipped(file_stream) + } else { + ZipWrapper::raw(file_stream) }; let mut stream = wrapper.get_stream(); let partial = evtclib::raw::parser::parse_partial_file(&mut stream)?; |