diff --git a/src/bin/loop_server.rs b/src/bin/loop_server.rs index 2d38daa..81c4948 100644 --- a/src/bin/loop_server.rs +++ b/src/bin/loop_server.rs @@ -20,17 +20,17 @@ const SRC_FILE: &'static [u8] = include_bytes!("../data/test1.webm"); #[derive(Clone)] struct WebmServer; -type BodyStream = Box, Error = hyper::Error>>; +type BodyStream = Box>; impl Service for WebmServer { type Request = Request; - type Response = Response>>; + type Response = Response; type Error = hyper::Error; type Future = FutureResult; fn call(&self, req: Request) -> Self::Future { let response = match (req.method(), req.path()) { (&Get, "/loop") => { - let stream: BodyStream> = Box::new( + let stream: BodyStream = Box::new( repeat::<&[u8], ()>(SRC_FILE).take(5) .parse_ebml().chunk_webm().fix_timecodes().find_starting_point() .map_err(|err| match err { diff --git a/src/chunk.rs b/src/chunk.rs index 7bfdf35..8e37bc3 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -52,17 +52,17 @@ impl AsRef<[u8]> for ClusterHead { } #[derive(Clone, Debug)] -pub enum Chunk = Vec> { +pub enum Chunk { Headers { - bytes: Arc + bytes: Arc> }, ClusterHead(ClusterHead), ClusterBody { - bytes: Arc + bytes: Arc> } } -impl> AsRef<[u8]> for Chunk { +impl AsRef<[u8]> for Chunk { fn as_ref(&self) -> &[u8] { match self { &Chunk::Headers {ref bytes, ..} => bytes.as_ref().as_ref(),