1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

Fix/suppress clippy warnings (#1720)

This commit is contained in:
Yuki Okushi
2020-10-01 18:19:09 +09:00
committed by GitHub
parent aa11231ee5
commit c2c71cc626
5 changed files with 4 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ impl PayloadConfig {
fn from_req(req: &HttpRequest) -> &Self {
req.app_data::<Self>()
.or_else(|| req.app_data::<web::Data<Self>>().map(|d| d.as_ref()))
.unwrap_or_else(|| &DEFAULT_CONFIG)
.unwrap_or(&DEFAULT_CONFIG)
}
}