diff --git a/Cargo.toml b/Cargo.toml index 2f62d86..280bd11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,5 +5,5 @@ authors = ["Tangent 128 "] [dependencies] bytes = "0.4" -futures = "0.1.14" -hyper = "0.11.2" +futures = "0.1.20" +hyper = "0.11.24" diff --git a/src/bin/loop_server.rs b/src/bin/loop_server.rs index 34031a7..ffc1808 100644 --- a/src/bin/loop_server.rs +++ b/src/bin/loop_server.rs @@ -28,14 +28,15 @@ impl Service for WebmServer { fn call(&self, req: Request) -> Self::Future { let response = match (req.method(), req.path()) { (&Get, "/loop") => { - let stream: BodyStream> = parse_webm(SRC_FILE).into_iter().chunk_webm() + let stream: BodyStream> = Box::new( + parse_webm(SRC_FILE).into_iter().chunk_webm() .chain(parse_webm(SRC_FILE).into_iter().chunk_webm()) .fix_timecodes() .map_err(|err| match err { ChunkingError::IoError(io_err) => hyper::Error::Io(io_err), ChunkingError::OtherError(_) => hyper::Error::Incomplete }) - .boxed(); + ); Response::new() .with_header(ContentType("video/webm".parse().unwrap())) .with_body(stream)