aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-13 16:33:27 +0200
committerDaniel <kingdread@gmx.de>2020-05-13 16:33:27 +0200
commitb6a13c465983993ac581051bb24a13d4296731a1 (patch)
tree2d3898ca6d2302910948964224496d79a842c2ff /src/main.rs
parentfb2a6088dcc7b57a2c1ac93ec6a8fbcc52584734 (diff)
downloadraidgrep-b6a13c465983993ac581051bb24a13d4296731a1.tar.gz
raidgrep-b6a13c465983993ac581051bb24a13d4296731a1.tar.bz2
raidgrep-b6a13c465983993ac581051bb24a13d4296731a1.zip
fix Aggregator::finish for trait objects
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index ad996ea..cb914d3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -384,7 +384,7 @@ fn build_filter(expr_string: &str) -> Result<Box<dyn LogFilter>> {
fn grep(opt: &Opt, filter: &dyn LogFilter) -> Result<()> {
let pipeline = output::build_pipeline(opt);
let pipeline_ref = &pipeline;
- rayon::scope(|s| {
+ let result: Result<()> = rayon::scope(|s| {
let walker = WalkDir::new(&opt.path);
for entry in walker {
let entry = entry?;
@@ -406,7 +406,8 @@ fn grep(opt: &Opt, filter: &dyn LogFilter) -> Result<()> {
});
}
Ok(())
- }) as Result<()>;
+ });
+ result?;
pipeline.finish();
Ok(())
}