Skip to content

Commit

Permalink
Propagate no_messages option to worker.
Browse files Browse the repository at this point in the history
Fixes #241
  • Loading branch information
BurntSushi committed Nov 20, 2016
1 parent 883d8fc commit 9598331
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 8 additions & 0 deletions src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9598331

Please sign in to comment.