diff --git a/actix-identity/src/middleware.rs b/actix-identity/src/middleware.rs index 893e623f6..82d32c879 100644 --- a/actix-identity/src/middleware.rs +++ b/actix-identity/src/middleware.rs @@ -162,14 +162,12 @@ fn enforce_policies(req: &ServiceRequest, configuration: &Configuration) { ) { identity.logout(); return; - } else { - if let Err(err) = identity.set_last_visited_at() { - tracing::warn!( - error.display = %err, - error.debug = ?err, - "Failed to set the last visited timestamp on `Identity` for an incoming request." - ); - } + } else if let Err(err) = identity.set_last_visited_at() { + tracing::warn!( + error.display = %err, + error.debug = ?err, + "Failed to set the last visited timestamp on `Identity` for an incoming request." + ); } } } diff --git a/actix-identity/tests/integration/test_app.rs b/actix-identity/tests/integration/test_app.rs index 93f41b85e..2192c1954 100644 --- a/actix-identity/tests/integration/test_app.rs +++ b/actix-identity/tests/integration/test_app.rs @@ -103,14 +103,14 @@ impl TestApp { } } -#[derive(Serialize, Deserialize, Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct EndpointResponse { pub user_id: Option, pub counter: i32, pub session_status: String, } -#[derive(Serialize, Deserialize, Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] struct LoginRequest { user_id: String, } diff --git a/actix-protobuf/src/lib.rs b/actix-protobuf/src/lib.rs index 21cd058e3..2592a6875 100644 --- a/actix-protobuf/src/lib.rs +++ b/actix-protobuf/src/lib.rs @@ -287,7 +287,7 @@ mod tests { } } - #[derive(Clone, PartialEq, Message)] + #[derive(Clone, PartialEq, Eq, Message)] pub struct MyObject { #[prost(int32, tag = "1")] pub number: i32, diff --git a/actix-session/src/lib.rs b/actix-session/src/lib.rs index db8271281..e115a4ebf 100644 --- a/actix-session/src/lib.rs +++ b/actix-session/src/lib.rs @@ -648,7 +648,7 @@ pub mod test_helpers { ); } - #[derive(Serialize, Deserialize, Debug, PartialEq)] + #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct IndexResponse { user_id: Option, counter: i32,