diff options
author | Daniel <kingdread@gmx.de> | 2021-11-12 16:09:32 +0100 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2021-11-12 16:10:16 +0100 |
commit | b5d23d478252e5b8415387e8f9d246ffeb0f17c6 (patch) | |
tree | a76d52ead3d5121647adcebfe384031ab9d69ed5 | |
parent | 57240aa00d7a8f7cd611654c44bd04cec9192133 (diff) | |
download | raidgrep-b5d23d478252e5b8415387e8f9d246ffeb0f17c6.tar.gz raidgrep-b5d23d478252e5b8415387e8f9d246ffeb0f17c6.tar.bz2 raidgrep-b5d23d478252e5b8415387e8f9d246ffeb0f17c6.zip |
Remove duplicate error handling in search_file
We already print out errors in the caller, no need to have this
duplicated error handling here.
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index 242e285..5001a17 100644 --- a/src/main.rs +++ b/src/main.rs @@ -533,14 +533,7 @@ fn search_file(path: &Path, is_zip: bool, filter: &dyn LogFilter) -> Result<Opti } let raw = evtclib::raw::parser::finish_parsing(partial, &mut stream)?; - let parsed = evtclib::process(&raw).ok(); - let log = if let Some(e) = parsed { - e - } else { - debug!("log file cannot be parsed: {:?}", path); - return Ok(None); - }; - + let log = evtclib::process(&raw)?; let info = extract_info(path, &log); let take_log = filter.filter(&info); |