From 7dc5e505d2fb791eb7bbc22574ffdb713c33daf2 Mon Sep 17 00:00:00 2001 From: geofmureithi Date: Thu, 4 Jul 2024 20:40:27 +0300 Subject: [PATCH] lint: clippy fixes --- packages/apalis-core/src/layers.rs | 4 ++-- packages/apalis-core/src/lib.rs | 3 ++- packages/apalis-core/src/worker/buffer/worker.rs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/apalis-core/src/layers.rs b/packages/apalis-core/src/layers.rs index 84db5c3d..0c7288a7 100644 --- a/packages/apalis-core/src/layers.rs +++ b/packages/apalis-core/src/layers.rs @@ -182,8 +182,8 @@ impl AckResponse { pub fn to_json(&self) -> String { format!( r#"{{"worker": "{}", "acknowledger": "{}", "result": "{}"}}"#, - self.worker.to_string(), - self.acknowledger.to_string(), + self.worker, + self.acknowledger, self.result ) } diff --git a/packages/apalis-core/src/lib.rs b/packages/apalis-core/src/lib.rs index 8fb411d9..5511ceef 100644 --- a/packages/apalis-core/src/lib.rs +++ b/packages/apalis-core/src/lib.rs @@ -145,7 +145,8 @@ pub mod interval { Poll::Pending => return Poll::Pending, }; let interval = self.interval; - let _ = std::mem::replace(&mut self.timer, Box::pin(sleep(interval))); + let fut = std::mem::replace(&mut self.timer, Box::pin(sleep(interval))); + drop(fut); Poll::Ready(Some(())) } } diff --git a/packages/apalis-core/src/worker/buffer/worker.rs b/packages/apalis-core/src/worker/buffer/worker.rs index b34d121b..1ace6f26 100644 --- a/packages/apalis-core/src/worker/buffer/worker.rs +++ b/packages/apalis-core/src/worker/buffer/worker.rs @@ -62,6 +62,7 @@ where /// /// If a `Message` is returned, the `bool` is true if this is the first time we received this /// message, and false otherwise (i.e., we tried to forward it to the backing service before). + #[allow(clippy::type_complexity)] fn poll_next_msg( &mut self, cx: &mut Context<'_>,