Skip to content

Commit

Permalink
Suppress unwanted clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Diggsey committed Sep 20, 2021
1 parent 5d287b7 commit 08b71b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ pub use utils::OwnedHandle;
/// of these errors is returned.
pub fn should_retry(error: &sqlx::Error) -> bool {
if let Some(db_error) = error.as_database_error() {
// It's more readable as a match
#[allow(clippy::match_like_matches_macro)]
match (db_error.code().as_deref(), db_error.constraint().as_deref()) {
// Unique constraint violation on ordered channel
(Some("23505"), Some("mq_msgs_channel_name_channel_args_after_message_id_idx")) => true,
Expand Down

0 comments on commit 08b71b5

Please sign in to comment.