From d33810da52a585805a87a72df855e769eb033de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sun, 20 Sep 2020 01:37:00 +0200 Subject: [PATCH] fix some clippy warnings --- src/threaded_archiver.rs | 2 -- src/web.rs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 {