diff options
author | Daniel <kingdread@gmx.de> | 2020-04-04 14:13:59 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-04-04 14:13:59 +0200 |
commit | c748642f3b801aa5ff4044ab60b0d0c29037a802 (patch) | |
tree | abfd9f5d4cb6f4f4024673ca99716c8ab1d510a4 /src/output/pipeline.rs | |
parent | 5d2f51ab8593946a0f24db367a887a37258901d5 (diff) | |
download | raidgrep-c748642f3b801aa5ff4044ab60b0d0c29037a802.tar.gz raidgrep-c748642f3b801aa5ff4044ab60b0d0c29037a802.tar.bz2 raidgrep-c748642f3b801aa5ff4044ab60b0d0c29037a802.zip |
make pipeline working
Diffstat (limited to 'src/output/pipeline.rs')
-rw-r--r-- | src/output/pipeline.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/pipeline.rs b/src/output/pipeline.rs index 9b3c7e5..fb23a6f 100644 --- a/src/output/pipeline.rs +++ b/src/output/pipeline.rs @@ -7,12 +7,12 @@ use std::{io::Write, sync::Mutex}; pub struct Pipeline { format: Box<dyn Format>, aggregator: Box<dyn Aggregator>, - writer: Mutex<Box<dyn Write>>, + writer: Mutex<Box<dyn Write + Send>>, } impl Pipeline { - pub fn new<W: Write + 'static, F: Format + 'static, A: Aggregator + 'static>(writer: W, format: F, aggregator: A) -> Pipeline { + pub fn new<W: Write + 'static + Send, F: Format + 'static, A: Aggregator + 'static>(writer: W, format: F, aggregator: A) -> Pipeline { Pipeline { format: Box::new(format), aggregator: Box::new(aggregator), @@ -22,6 +22,6 @@ impl Pipeline { pub fn push_item(&self, item: &LogResult) { let mut writer = self.writer.lock().unwrap(); - self.aggregator.push_item(item, &self.format, &mut *writer); + self.aggregator.push_item(item, &*self.format, &mut *writer); } } |