diff options
author | Daniel <kingdread@gmx.de> | 2020-05-14 16:13:28 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-05-14 16:13:28 +0200 |
commit | c973f2ddb47721254f6f5a81e4c45f0c72d793fd (patch) | |
tree | 4aa7c00b87eec09ee1faca957be508efe3dbbb65 /src/output/pipeline.rs | |
parent | 331d6b1762d1d9431b210fc98a495d56ad7a1cd1 (diff) | |
parent | e2d23d4b76000263e9f939637353bbc4bb9289fd (diff) | |
download | raidgrep-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.rs | 7 |
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); + } } |