fix: fix warnings

This commit is contained in:
Keita Nonaka 2021-05-14 15:19:18 +09:00
parent 4903950b22
commit abc85ef31d
4 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ pub struct Files {
mime_override: Option<Rc<MimeOverride>>,
file_flags: named::Flags,
use_guards: Option<Rc<dyn Guard>>,
guards: Vec<Box<Rc<dyn Guard>>>,
guards: Vec<Rc<dyn Guard>>,
hidden_files: bool,
}

View File

@ -84,7 +84,7 @@ impl<B> Response<B> {
pub fn with_body(status: StatusCode, body: B) -> Response<B> {
Response {
head: BoxedResponseHead::new(status),
body: body,
body,
}
}

View File

@ -1,4 +1,4 @@
use actix_web::{test, web, App, HttpResponse};
use actix_web::{web, App, HttpResponse};
use awc::Client;
use criterion::{criterion_group, criterion_main, Criterion};
use futures_util::future::join_all;

View File

@ -901,7 +901,7 @@ async fn test_normalize() {
let srv = actix_test::start_with(actix_test::config().h1(), || {
App::new()
.wrap(NormalizePath::new(TrailingSlash::Trim))
.service(web::resource("/one").route(web::to(|| HttpResponse::Ok())))
.service(web::resource("/one").route(web::to(HttpResponse::Ok)))
});
let response = srv.get("/one/").send().await.unwrap();