summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-07 21:54:28 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-07 21:54:28 -0400
commit0042dce9498ed0e0d46e3e7cd86b85dcb822c8e1 (patch)
tree2e881bc552ef58856d28cc8714029400e4f37451 /src/main.rs
parentca058d7584ddc16d88a8dbff90b89cae8fca6e90 (diff)
Hack in Windows console coloring.0.0.11
The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 15b250a6..722232a8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -35,6 +35,7 @@ use std::thread;
use crossbeam::sync::chase_lev::{self, Steal, Stealer};
use grep::Grep;
use memmap::{Mmap, Protection};
+use term::Terminal;
use walkdir::DirEntry;
use args::Args;
@@ -198,11 +199,11 @@ impl Worker {
let mut printer = self.args.printer(outbuf);
self.do_work(&mut printer, work);
let outbuf = printer.into_inner();
- if !outbuf.is_empty() {
+ if !outbuf.get_ref().is_empty() {
let mut out = self.out.lock().unwrap();
out.write(&outbuf);
}
- self.outbuf = Some(outbuf);
+ self.outbuf = Some(outbuf.into_inner());
}
self.match_count
}