Optimize Rust code with Clippy

This commit is contained in:
spikecodes 2021-01-01 12:33:57 -08:00
parent 64a92195dd
commit d43b49e7e4
7 changed files with 71 additions and 73 deletions

View file

@ -23,7 +23,7 @@ pub async fn handler(web::Path(url): web::Path<String>) -> Result<HttpResponse>
.send()
.await
.map_err(Error::from)
.and_then(|res| Ok(HttpResponse::build(res.status()).streaming(res)))
.map(|res| HttpResponse::build(res.status()).streaming(res))
} else {
Ok(HttpResponse::Ok().body(""))
}