From 08b71b59aeb7edd7377c4b745959aa7458c3b4ae Mon Sep 17 00:00:00 2001 From: Diggory Blake Date: Mon, 20 Sep 2021 13:39:13 +0100 Subject: [PATCH] Suppress unwanted clippy lint --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 558f707..1dff820 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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,