Stream results when feasible.

For example, when only a single file (or stdin) is being searched, then we
should be able to print directly to the terminal instead of intermediate
buffers. (The buffers are only necessary for parallelism.)

Closes #4.
This commit is contained in:
Andrew Gallant
2016-09-13 21:11:46 -04:00
parent f11d9fb922
commit fdca74148d
12 changed files with 493 additions and 650 deletions

View File

@@ -216,7 +216,7 @@ impl Types {
if self.negated.as_ref().map(|s| s.is_match(&*name)).unwrap_or(false) {
return Match::Ignored(&self.unmatched_pat);
}
if self.selected.as_ref().map(|s| s.is_match(&*name)).unwrap_or(false) {
if self.selected.as_ref().map(|s|s.is_match(&*name)).unwrap_or(false) {
return Match::Whitelist(&self.unmatched_pat);
}
if self.has_selected {