mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
chore: cleanup and addressing clippy lints
This commit is contained in:
@@ -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))]
|
||||
|
||||
Reference in New Issue
Block a user