From b6a13c465983993ac581051bb24a13d4296731a1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 13 May 2020 16:33:27 +0200 Subject: fix Aggregator::finish for trait objects --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') 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> { 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(()) } -- cgit v1.2.3