@@ -219,9 +219,6 @@ fn retry_automatically<T>(
219219
220220// Check if a database error can be retried
221221fn error_retryable(error: &postgres::error::DbError) -> bool {
222− match error.code() {
223− // Caused by lock_timeout being exceeded
224− &postgres::error::SqlState::LOCK_NOT_AVAILABLE => true,
225− _ => false,
226− }
222+ // LOCK_NOT_AVAILABLE is caused by lock_timeout being exceeded
223+ matches!(error.code(), &postgres::error::SqlState::LOCK_NOT_AVAILABLE)
227224}