match -> matches!
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
asonix 2023-09-04 22:06:28 -05:00
parent 492b99922b
commit 9c50bbe23a

View file

@ -130,17 +130,18 @@ impl PostgresError {
}
pub(super) const fn is_disconnected(&self) -> bool {
match self {
matches!(
self,
Self::Pool(
PoolError::Closed
| PoolError::Backend(diesel_async::pooled_connection::PoolError::ConnectionError(_)),
)
| Self::Diesel(diesel::result::Error::DatabaseError(
| PoolError::Backend(
diesel_async::pooled_connection::PoolError::ConnectionError(_)
),
) | Self::Diesel(diesel::result::Error::DatabaseError(
diesel::result::DatabaseErrorKind::ClosedConnection,
_,
)) => true,
_ => false,
}
))
)
}
}