mirror of
https://github.com/ilyakooo0/reshape.git
synced 2024-09-11 10:25:29 +03:00
Fix clippy warning for match on DB error
This commit is contained in:
parent
40fb39741d
commit
6fcab3c88d
@ -219,9 +219,6 @@ fn retry_automatically<T>(
|
||||
|
||||
// Check if a database error can be retried
|
||||
fn error_retryable(error: &postgres::error::DbError) -> bool {
|
||||
match error.code() {
|
||||
// Caused by lock_timeout being exceeded
|
||||
&postgres::error::SqlState::LOCK_NOT_AVAILABLE => true,
|
||||
_ => false,
|
||||
}
|
||||
// LOCK_NOT_AVAILABLE is caused by lock_timeout being exceeded
|
||||
matches!(error.code(), &postgres::error::SqlState::LOCK_NOT_AVAILABLE)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user