mirror of https://github.com/fafhrd91/actix-web
fix: fix warnings
This commit is contained in:
parent
4903950b22
commit
abc85ef31d
|
@ -38,7 +38,7 @@ pub struct Files {
|
||||||
mime_override: Option<Rc<MimeOverride>>,
|
mime_override: Option<Rc<MimeOverride>>,
|
||||||
file_flags: named::Flags,
|
file_flags: named::Flags,
|
||||||
use_guards: Option<Rc<dyn Guard>>,
|
use_guards: Option<Rc<dyn Guard>>,
|
||||||
guards: Vec<Box<Rc<dyn Guard>>>,
|
guards: Vec<Rc<dyn Guard>>,
|
||||||
hidden_files: bool,
|
hidden_files: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ impl<B> Response<B> {
|
||||||
pub fn with_body(status: StatusCode, body: B) -> Response<B> {
|
pub fn with_body(status: StatusCode, body: B) -> Response<B> {
|
||||||
Response {
|
Response {
|
||||||
head: BoxedResponseHead::new(status),
|
head: BoxedResponseHead::new(status),
|
||||||
body: body,
|
body,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use actix_web::{test, web, App, HttpResponse};
|
use actix_web::{web, App, HttpResponse};
|
||||||
use awc::Client;
|
use awc::Client;
|
||||||
use criterion::{criterion_group, criterion_main, Criterion};
|
use criterion::{criterion_group, criterion_main, Criterion};
|
||||||
use futures_util::future::join_all;
|
use futures_util::future::join_all;
|
||||||
|
|
|
@ -901,7 +901,7 @@ async fn test_normalize() {
|
||||||
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(NormalizePath::new(TrailingSlash::Trim))
|
.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();
|
let response = srv.get("/one/").send().await.unwrap();
|
||||||
|
|
Loading…
Reference in New Issue