Skip to content

Commit

Permalink
Fix/suppress clippy warnings (actix#1720)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor authored Oct 1, 2020
1 parent aa11231 commit c2c71cc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions actix-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
clippy::new_without_default,
clippy::borrow_interior_mutable_const
)]
#![allow(clippy::manual_strip)] // Allow this to keep MSRV(1.42).

#[macro_use]
extern crate log;
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#![deny(rust_2018_idioms)]
#![allow(clippy::needless_doctest_main, clippy::type_complexity)]
#![allow(clippy::rc_buffer)] // FXIME: We should take a closer look for the warnings at some point.
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

Expand Down
1 change: 0 additions & 1 deletion src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ type BoxedResponse = LocalBoxFuture<'static, Result<ServiceResponse, Error>>;
/// * /{project_id}/path1 - responds to all http method
/// * /{project_id}/path2 - `GET` requests
/// * /{project_id}/path3 - `HEAD` requests
///
pub struct Scope<T = ScopeEndpoint> {
endpoint: T,
rdef: String,
Expand Down
2 changes: 1 addition & 1 deletion src/types/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl JsonConfig {
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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/types/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit c2c71cc

Please sign in to comment.