diff --git a/src/threaded_archiver.rs b/src/threaded_archiver.rs index 6220c48..7902729 100644 --- a/src/threaded_archiver.rs +++ b/src/threaded_archiver.rs @@ -1,6 +1,4 @@ use futures::prelude::*; -use tar; -use bytes; use std::io; use std::path::PathBuf; diff --git a/src/web.rs b/src/web.rs index 5a76ae3..324d10d 100644 --- a/src/web.rs +++ b/src/web.rs @@ -46,7 +46,7 @@ async fn handle_tar(req: HttpRequest, root: web::Data, web::Path(tail): } let stream = crate::threaded_archiver::stream_tar_in_thread(fullpath) - .map(|item| Ok::<_, Error>(item)); + .map(Ok::<_, Error>); let res = HttpResponse::Ok() .content_type("application/x-tar") .streaming(stream); @@ -54,7 +54,7 @@ async fn handle_tar(req: HttpRequest, root: web::Data, web::Path(tail): Ok(res) } -const FAVICON_ICO: &'static [u8] = include_bytes!("favicon.png"); +const FAVICON_ICO: &[u8] = include_bytes!("favicon.png"); #[get("/favicon.ico")] async fn favicon_ico() -> impl Responder {