Stop after first match is found with --quiet.

Fixes #77.
This commit is contained in:
Andrew Gallant
2016-09-25 15:01:27 -04:00
parent 95edcd4d3a
commit 9dc5464c84
6 changed files with 13 additions and 4 deletions

View File

@@ -116,6 +116,11 @@ impl<W: Terminal + Send> Printer<W> {
self.has_printed
}
/// Returns true if the printer has been configured to be quiet.
pub fn is_quiet(&self) -> bool {
self.quiet
}
/// Flushes the underlying writer and returns it.
pub fn into_inner(mut self) -> W {
let _ = self.wtr.flush();