addressing clippy lints

This commit is contained in:
realaravinth 2021-06-29 20:12:51 +05:30
parent 1065fa3864
commit 481cb95cd2
No known key found for this signature in database
GPG Key ID: AD9F0F08E855ED88
3 changed files with 4 additions and 13 deletions

View File

@ -57,20 +57,11 @@ async fn delete_account(
Err(ServiceError::WrongPassword) Err(ServiceError::WrongPassword)
} }
} }
Err(RowNotFound) => return Err(ServiceError::UsernameNotFound), Err(RowNotFound) => Err(ServiceError::UsernameNotFound),
Err(_) => return Err(ServiceError::InternalServerError), Err(_) => Err(ServiceError::InternalServerError),
} }
} }
pub fn services(cfg: &mut actix_web::web::ServiceConfig) { pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
cfg.service(delete_account); cfg.service(delete_account);
// use crate::define_resource;
// use crate::V1_API_ROUTES;
//
// define_resource!(
// cfg,
// V1_API_ROUTES.account.delete,
// Methods::ProtectPost,
// delete_account
// );
} }

View File

@ -85,7 +85,7 @@ pub mod runners {
} }
}; };
if payload.login.contains("@") { if payload.login.contains('@') {
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
struct EmailLogin { struct EmailLogin {
name: String, name: String,

View File

@ -144,7 +144,7 @@ mod tests {
assert_eq!(resp.status(), StatusCode::OK); assert_eq!(resp.status(), StatusCode::OK);
let health_resp: Health = test::read_body_json(resp).await; let health_resp: Health = test::read_body_json(resp).await;
assert_eq!(health_resp.db, true); assert!(health_resp.db);
assert_eq!(health_resp.redis, Some(true)); assert_eq!(health_resp.redis, Some(true));
} }
} }