From 8b0467c1d7a28098a6a50efe2f267d603b06f863 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Fri, 13 Apr 2018 18:53:34 -0400 Subject: [PATCH] Add Send bound to WebmetroError::Unknown --- src/commands/relay.rs | 4 ++-- src/error.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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) } }