From de9e9c4d7a0b656b38c17c1a88631ba207419b02 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 9 Apr 2020 17:05:44 +0200 Subject: replace match on bool with if/else --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.rs') 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> { .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)?; -- cgit v1.2.3