diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
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(()) } |