diff --git a/src/commands/relay.rs b/src/commands/relay.rs index c382293..6c5b29b 100644 --- a/src/commands/relay.rs +++ b/src/commands/relay.rs @@ -58,9 +58,9 @@ impl RelayServer { } fn post_stream, S: Stream + 'static>(&self, stream: S) -> BodyStream - where S::Error: Error { + where S::Error: Error + Send { let source = stream - .map_err(|err| WebmetroError::Unknown(err.into())) + .map_err(|err| WebmetroError::Unknown(Box::new(err))) .parse_ebml().chunk_webm(); let sink = Transmitter::new(self.get_channel()); diff --git a/src/error.rs b/src/error.rs index 2073d53..050f147 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,7 +14,7 @@ use ebml::EbmlError; pub enum WebmetroError { EbmlError(EbmlError), IoError(IoError), - Unknown(Box) + Unknown(Box) } impl Display for WebmetroError { @@ -48,8 +48,8 @@ impl From for WebmetroError { } } -impl From> for WebmetroError { - fn from(err: Box) -> WebmetroError { +impl From> for WebmetroError { + fn from(err: Box) -> WebmetroError { WebmetroError::Unknown(err) } }