1
0
Fork 0
mirror of https://codeberg.org/Mo8it/git-webhook-client synced 2024-11-21 11:06:32 +00:00

Thanks clippy <3

This commit is contained in:
Mo 2022-12-27 19:37:12 +01:00
parent 730e0e2def
commit 1f3046c4d3
3 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ where
} }
impl ReceivedSignature { 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::<Sha256>::new_from_slice(secret) let mut mac = Hmac::<Sha256>::new_from_slice(secret)
.expect("Can not generate a mac from the secret!"); .expect("Can not generate a mac from the secret!");
mac.update(body); mac.update(body);

View file

@ -69,8 +69,8 @@ pub async fn trigger(
hook: hook.clone(), hook: hook.clone(),
hook_log_id, hook_log_id,
hook_log_link: hook_log_link.clone(), hook_log_link: hook_log_link.clone(),
db: db.clone(), db,
mailer: mailer.clone(), mailer,
}; };
// Spawn and detach a task that runs the command and fills the output in the log. // Spawn and detach a task that runs the command and fills the output in the log.

View file

@ -12,7 +12,7 @@ pub struct Task {
} }
impl Task { impl Task {
pub async fn run(self) { pub async fn run(&self) {
info!("Running webhook for repo: {}", self.hook.clone_url); info!("Running webhook for repo: {}", self.hook.clone_url);
let stdout: Vec<u8>; let stdout: Vec<u8>;