remove some useless stuff

This commit is contained in:
Omid Rad 2021-07-13 00:55:40 +02:00
parent eced22d546
commit 39e2aa39f8
1 changed files with 2 additions and 5 deletions

View File

@ -357,8 +357,7 @@ mod tests {
.finish()
}
async fn test(req: HttpRequest, bytes: Bytes) -> HttpResponse {
let body = String::from_utf8(bytes.to_vec()).unwrap();
async fn test(req: HttpRequest, body: Bytes) -> HttpResponse {
if req.method() == Method::POST && !body.is_empty() {
HttpResponse::Ok().finish()
} else {
@ -385,9 +384,7 @@ mod tests {
.finish()
}
async fn test(req: HttpRequest, bytes: Bytes) -> HttpResponse {
let body = String::from_utf8(bytes.to_vec()).unwrap();
async fn test(req: HttpRequest, body: Bytes) -> HttpResponse {
if (req.method() == Method::GET || req.method() == Method::HEAD)
&& body.is_empty()
{