Add Send bound to WebmetroError::Unknown
This commit is contained in:
parent
2170096a21
commit
8b0467c1d7
2 changed files with 5 additions and 5 deletions
|
@ -58,9 +58,9 @@ impl RelayServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn post_stream<I: AsRef<[u8]>, S: Stream<Item = I> + 'static>(&self, stream: S) -> BodyStream
|
fn post_stream<I: AsRef<[u8]>, S: Stream<Item = I> + 'static>(&self, stream: S) -> BodyStream
|
||||||
where S::Error: Error {
|
where S::Error: Error + Send {
|
||||||
let source = stream
|
let source = stream
|
||||||
.map_err(|err| WebmetroError::Unknown(err.into()))
|
.map_err(|err| WebmetroError::Unknown(Box::new(err)))
|
||||||
.parse_ebml().chunk_webm();
|
.parse_ebml().chunk_webm();
|
||||||
let sink = Transmitter::new(self.get_channel());
|
let sink = Transmitter::new(self.get_channel());
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use ebml::EbmlError;
|
||||||
pub enum WebmetroError {
|
pub enum WebmetroError {
|
||||||
EbmlError(EbmlError),
|
EbmlError(EbmlError),
|
||||||
IoError(IoError),
|
IoError(IoError),
|
||||||
Unknown(Box<Error>)
|
Unknown(Box<Error + Send>)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for WebmetroError {
|
impl Display for WebmetroError {
|
||||||
|
@ -48,8 +48,8 @@ impl From<IoError> for WebmetroError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Box<Error>> for WebmetroError {
|
impl From<Box<Error + Send>> for WebmetroError {
|
||||||
fn from(err: Box<Error>) -> WebmetroError {
|
fn from(err: Box<Error + Send>) -> WebmetroError {
|
||||||
WebmetroError::Unknown(err)
|
WebmetroError::Unknown(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue