mirror of https://github.com/fafhrd91/actix-web
remove some useless stuff
This commit is contained in:
parent
eced22d546
commit
39e2aa39f8
|
@ -357,8 +357,7 @@ mod tests {
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn test(req: HttpRequest, bytes: Bytes) -> HttpResponse {
|
async fn test(req: HttpRequest, body: Bytes) -> HttpResponse {
|
||||||
let body = String::from_utf8(bytes.to_vec()).unwrap();
|
|
||||||
if req.method() == Method::POST && !body.is_empty() {
|
if req.method() == Method::POST && !body.is_empty() {
|
||||||
HttpResponse::Ok().finish()
|
HttpResponse::Ok().finish()
|
||||||
} else {
|
} else {
|
||||||
|
@ -385,9 +384,7 @@ mod tests {
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn test(req: HttpRequest, bytes: Bytes) -> HttpResponse {
|
async fn test(req: HttpRequest, body: Bytes) -> HttpResponse {
|
||||||
let body = String::from_utf8(bytes.to_vec()).unwrap();
|
|
||||||
|
|
||||||
if (req.method() == Method::GET || req.method() == Method::HEAD)
|
if (req.method() == Method::GET || req.method() == Method::HEAD)
|
||||||
&& body.is_empty()
|
&& body.is_empty()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue