Only create the Grep searcher once.

This commit is contained in:
Andrew Gallant
2016-09-06 19:33:19 -04:00
parent fd3e5069b6
commit 9948e0ca07
2 changed files with 11 additions and 7 deletions

View File

@@ -99,7 +99,7 @@ fn run(args: Args) -> Result<u64> {
chan_work: stealer.clone(),
inpbuf: args.input_buffer(),
outbuf: Some(vec![]),
grep: try!(args.grep()),
grep: args.grep(),
match_count: 0,
};
workers.push(thread::spawn(move || worker.run()));