diff options
author | Daniel <kingdread@gmx.de> | 2020-04-09 17:05:44 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-04-09 17:05:44 +0200 |
commit | de9e9c4d7a0b656b38c17c1a88631ba207419b02 (patch) | |
tree | e7767d1d5560211f44a1b8c85355552c688b13f0 /src | |
parent | 79eae45196e89672a8d564e7595330cd7743fe17 (diff) | |
download | raidgrep-de9e9c4d7a0b656b38c17c1a88631ba207419b02.tar.gz raidgrep-de9e9c4d7a0b656b38c17c1a88631ba207419b02.tar.bz2 raidgrep-de9e9c4d7a0b656b38c17c1a88631ba207419b02.zip |
replace match on bool with if/else
Diffstat (limited to 'src')
-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)?; |