diff options
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); } } |