mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-14 13:08:27 +03:00
addressing clippy lints
This commit is contained in:
parent
1065fa3864
commit
481cb95cd2
3 changed files with 4 additions and 13 deletions
|
@ -57,20 +57,11 @@ async fn delete_account(
|
|||
Err(ServiceError::WrongPassword)
|
||||
}
|
||||
}
|
||||
Err(RowNotFound) => return Err(ServiceError::UsernameNotFound),
|
||||
Err(_) => return Err(ServiceError::InternalServerError),
|
||||
Err(RowNotFound) => Err(ServiceError::UsernameNotFound),
|
||||
Err(_) => Err(ServiceError::InternalServerError),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||
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
|
||||
// );
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ pub mod runners {
|
|||
}
|
||||
};
|
||||
|
||||
if payload.login.contains("@") {
|
||||
if payload.login.contains('@') {
|
||||
#[derive(Clone, Debug)]
|
||||
struct EmailLogin {
|
||||
name: String,
|
||||
|
|
|
@ -144,7 +144,7 @@ mod tests {
|
|||
assert_eq!(resp.status(), StatusCode::OK);
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue