mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-25 02:51:17 +00:00
match -> matches!
This commit is contained in:
parent
492b99922b
commit
9c50bbe23a
1 changed files with 8 additions and 7 deletions
|
@ -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,
|
||||
}
|
||||
))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue