From ae707cb2ed4a3d4c97df9f399189579b521f3973 Mon Sep 17 00:00:00 2001 From: Xavier Vello Date: Mon, 6 May 2024 17:25:27 +0200 Subject: [PATCH] chore: cleanup unnecessary clippy allows (#40) --- hook-common/src/kafka_messages/plugin_logs.rs | 2 -- hook-worker/src/worker.rs | 13 +++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/hook-common/src/kafka_messages/plugin_logs.rs b/hook-common/src/kafka_messages/plugin_logs.rs index 5a852e6..039788a 100644 --- a/hook-common/src/kafka_messages/plugin_logs.rs +++ b/hook-common/src/kafka_messages/plugin_logs.rs @@ -4,7 +4,6 @@ use uuid::Uuid; use super::serialize_datetime; -#[allow(dead_code)] #[derive(Serialize)] pub enum PluginLogEntrySource { System, @@ -12,7 +11,6 @@ pub enum PluginLogEntrySource { Console, } -#[allow(dead_code)] #[derive(Serialize)] pub enum PluginLogEntryType { Debug, diff --git a/hook-worker/src/worker.rs b/hook-worker/src/worker.rs index fdb405a..9dcc4a2 100644 --- a/hook-worker/src/worker.rs +++ b/hook-worker/src/worker.rs @@ -7,9 +7,7 @@ use futures::future::join_all; use health::HealthHandle; use hook_common::pgqueue::PgTransactionBatch; use hook_common::{ - pgqueue::{ - DatabaseError, Job, PgQueue, PgQueueJob, PgTransactionJob, RetryError, RetryInvalidError, - }, + pgqueue::{Job, PgQueue, PgQueueJob, PgTransactionJob, RetryError, RetryInvalidError}, retry::RetryPolicy, webhook::{HttpMethod, WebhookJobError, WebhookJobMetadata, WebhookJobParameters}, }; @@ -489,32 +487,27 @@ fn parse_retry_after_header(header_map: &reqwest::header::HeaderMap) -> Option String { std::process::id().to_string() } /// Get a request client or panic - #[allow(dead_code)] fn localhost_client() -> Client { build_http_client(Duration::from_secs(1), true).expect("failed to create client") } - #[allow(dead_code)] async fn enqueue_job( queue: &PgQueue, max_attempts: i32,