chore: cleanup and addressing clippy lints

This commit is contained in:
realaravinth
2022-05-27 18:37:59 +05:30
parent d7fd23f565
commit 629c841e2d
11 changed files with 14 additions and 45 deletions

View File

@@ -240,21 +240,6 @@ impl From<CaptchaError> for ServiceError {
}
}
//#[cfg(not(tarpaulin_include))]
//impl From<sqlx::Error> for ServiceError {
// #[cfg(not(tarpaulin_include))]
// fn from(e: sqlx::Error) -> Self {
// use sqlx::error::Error;
// use std::borrow::Cow;
// if let Error::Database(err) = e {
// if err.code() == Some(Cow::from("23505")) {
// return ServiceError::UsernameTaken;
// }
// }
// ServiceError::InternalServerError
// }
//}
#[cfg(not(tarpaulin_include))]
impl From<SmtpError> for ServiceError {
#[cfg(not(tarpaulin_include))]
@@ -294,14 +279,6 @@ pub enum PageError {
ServiceError(ServiceError),
}
#[cfg(not(tarpaulin_include))]
impl From<sqlx::Error> for PageError {
#[cfg(not(tarpaulin_include))]
fn from(_: sqlx::Error) -> Self {
PageError::InternalServerError
}
}
#[cfg(not(tarpaulin_include))]
impl From<ServiceError> for PageError {
#[cfg(not(tarpaulin_include))]