aboutsummaryrefslogtreecommitdiff
path: root/src/output/pipeline.rs
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-14 16:13:28 +0200
committerDaniel <kingdread@gmx.de>2020-05-14 16:13:28 +0200
commitc973f2ddb47721254f6f5a81e4c45f0c72d793fd (patch)
tree4aa7c00b87eec09ee1faca957be508efe3dbbb65 /src/output/pipeline.rs
parent331d6b1762d1d9431b210fc98a495d56ad7a1cd1 (diff)
parente2d23d4b76000263e9f939637353bbc4bb9289fd (diff)
downloadraidgrep-c973f2ddb47721254f6f5a81e4c45f0c72d793fd.tar.gz
raidgrep-c973f2ddb47721254f6f5a81e4c45f0c72d793fd.tar.bz2
raidgrep-c973f2ddb47721254f6f5a81e4c45f0c72d793fd.zip
Merge branch 'sorted-output'
Diffstat (limited to 'src/output/pipeline.rs')
-rw-r--r--src/output/pipeline.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/output/pipeline.rs b/src/output/pipeline.rs
index 9664928..9b7f461 100644
--- a/src/output/pipeline.rs
+++ b/src/output/pipeline.rs
@@ -22,8 +22,13 @@ impl Pipeline {
}
}
- pub fn push_item(&self, item: &LogResult) {
+ pub fn push_item(&self, item: LogResult) {
let mut writer = self.writer.lock().unwrap();
self.aggregator.push_item(item, &*self.format, &mut *writer);
}
+
+ pub fn finish(self) {
+ let mut writer = self.writer.lock().unwrap();
+ self.aggregator.finish(&*self.format, &mut *writer);
+ }
}