From 9c50bbe23a5c6dc648addf142845b5175aa0101b Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 4 Sep 2023 22:06:28 -0500 Subject: [PATCH] match -> matches! --- src/repo/postgres.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/repo/postgres.rs b/src/repo/postgres.rs index 48ee06d..40bfe57 100644 --- a/src/repo/postgres.rs +++ b/src/repo/postgres.rs @@ -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, - } + )) + ) } }