diff options
author | Andrew Gallant <jamslam@gmail.com> | 2016-11-20 14:27:18 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2016-11-20 15:01:37 -0500 |
commit | 9598331fa81c653dd581f750494e0dc51cca1963 (patch) | |
tree | 1208bfff4647be39891e11a44f9e7df42930500e | |
parent | 883d8fc72f0be582ee95e6191231b4f716c42bae (diff) |
Propagate no_messages option to worker.
Fixes #241
-rw-r--r-- | src/args.rs | 1 | ||||
-rw-r--r-- | src/worker.rs | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index a98a1b6a..aa8f2764 100644 --- a/src/args.rs +++ b/src/args.rs @@ -197,6 +197,7 @@ impl Args { .invert_match(self.invert_match) .max_count(self.max_count) .mmap(self.mmap) + .no_messages(self.no_messages) .quiet(self.quiet) .text(self.text) .build() diff --git a/src/worker.rs b/src/worker.rs index 0e700dfb..59198dd5 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -156,6 +156,14 @@ impl WorkerBuilder { self } + /// If enabled, error messages are suppressed. + /// + /// This is disabled by default. + pub fn no_messages(mut self, yes: bool) -> Self { + self.opts.no_messages = yes; + self + } + /// If enabled, don't show any output and quit searching after the first /// match is found. pub fn quiet(mut self, yes: bool) -> Self { |