diff --git a/src/server.rs b/src/server.rs index af04c40..ff03047 100644 --- a/src/server.rs +++ b/src/server.rs @@ -5,7 +5,6 @@ use async_zip::write::{EntryOptions, ZipFileWriter}; use async_zip::Compression; use futures::stream::StreamExt; use futures::TryStreamExt; -use hyper::body::Bytes; use hyper::header::HeaderValue; use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Method, StatusCode}; @@ -16,10 +15,10 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::SystemTime; use tokio::fs::File; -use tokio::io::{AsyncReadExt, AsyncWrite}; +use tokio::io::AsyncWrite; use tokio::{fs, io}; use tokio_util::codec::{BytesCodec, FramedRead}; -use tokio_util::io::StreamReader; +use tokio_util::io::{ReaderStream, StreamReader}; type Request = hyper::Request
; type Response = hyper::Response; @@ -188,27 +187,15 @@ impl InnerService { } async fn handle_send_dir_zip(&self, path: &Path) -> BoxResult