fix some clippy warnings

This commit is contained in:
Дамјан Георгиевски 2020-09-20 01:37:00 +02:00
parent 4fcfe1e5da
commit d33810da52
2 changed files with 2 additions and 4 deletions

View file

@ -1,6 +1,4 @@
use futures::prelude::*;
use tar;
use bytes;
use std::io;
use std::path::PathBuf;

View file

@ -46,7 +46,7 @@ async fn handle_tar(req: HttpRequest, root: web::Data<PathBuf>, 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<PathBuf>, 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 {