diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 89dab09..dbb8f36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -285,6 +285,7 @@ fn is_log_file(entry: &DirEntry) -> bool { /// Run the grep search with the given options. fn grep(opt: &Opt) -> Result<(), RuntimeError> { + let pipeline = &output::build_pipeline(opt); rayon::scope(|s| { let walker = WalkDir::new(&opt.path); for entry in walker { @@ -294,7 +295,7 @@ fn grep(opt: &Opt) -> Result<(), RuntimeError> { let search = search_log(&entry, opt); match search { Ok(None) => (), - Ok(Some(result)) => output::output(io::stdout(), opt, &result).unwrap(), + Ok(Some(result)) => pipeline.push_item(&result), Err(err) => { debug!("Runtime error while scanning {:?}: {}", entry.path(), err); } |