From 1f3046c4d3139eb2b3489e0e1af4a3cba2e558aa Mon Sep 17 00:00:00 2001 From: Mo8it Date: Tue, 27 Dec 2022 19:37:12 +0100 Subject: [PATCH] Thanks clippy <3 --- src/extractors.rs | 2 +- src/routes.rs | 4 ++-- src/webhook.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extractors.rs b/src/extractors.rs index 6bd4bfe..0c963e6 100644 --- a/src/extractors.rs +++ b/src/extractors.rs @@ -37,7 +37,7 @@ where } impl ReceivedSignature { - pub async fn is_valid(self, secret: &[u8], body: &[u8]) -> bool { + pub async fn is_valid(&self, secret: &[u8], body: &[u8]) -> bool { let mut mac = Hmac::::new_from_slice(secret) .expect("Can not generate a mac from the secret!"); mac.update(body); diff --git a/src/routes.rs b/src/routes.rs index 6381393..e98c5ad 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -69,8 +69,8 @@ pub async fn trigger( hook: hook.clone(), hook_log_id, hook_log_link: hook_log_link.clone(), - db: db.clone(), - mailer: mailer.clone(), + db, + mailer, }; // Spawn and detach a task that runs the command and fills the output in the log. diff --git a/src/webhook.rs b/src/webhook.rs index d1c8a8f..11f6976 100644 --- a/src/webhook.rs +++ b/src/webhook.rs @@ -12,7 +12,7 @@ pub struct Task { } impl Task { - pub async fn run(self) { + pub async fn run(&self) { info!("Running webhook for repo: {}", self.hook.clone_url); let stdout: Vec;