run clippy fix

This commit is contained in:
Lennart K
2025-10-27 19:01:04 +01:00
parent 08041c60be
commit 0d071d3b92
94 changed files with 455 additions and 484 deletions

View File

@@ -15,16 +15,16 @@ pub enum Error {
impl From<sqlx::Error> for Error {
fn from(value: sqlx::Error) -> Self {
match value {
sqlx::Error::RowNotFound => Error::StoreError(rustical_store::Error::NotFound),
sqlx::Error::RowNotFound => Self::StoreError(rustical_store::Error::NotFound),
sqlx::Error::Database(err) => {
if err.is_unique_violation() {
warn!("{err:?}");
Error::StoreError(rustical_store::Error::AlreadyExists)
Self::StoreError(rustical_store::Error::AlreadyExists)
} else {
Error::SqlxError(sqlx::Error::Database(err))
Self::SqlxError(sqlx::Error::Database(err))
}
}
err => Error::SqlxError(err),
err => Self::SqlxError(err),
}
}
}