From 59035c4532110a9fec8309bbda55d8ba6d14ce94 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 27 Jan 2025 00:01:08 +0100 Subject: Make clippy happy --- server/src/githook.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'server/src/githook.rs') diff --git a/server/src/githook.rs b/server/src/githook.rs index f0e872a..24b4359 100644 --- a/server/src/githook.rs +++ b/server/src/githook.rs @@ -60,11 +60,8 @@ async fn main() -> Result<(), Box> { if data.len() == 3 { let mut commiter: Option = None; if pre && data[1] != git::EMPTY { - match repo.get_commiter(data[1]).await { - Ok(user) => { - commiter = Some(user.username); - } - Err(_) => {} + if let Ok(user) = repo.get_commiter(data[1]).await { + commiter = Some(user.username); } } @@ -72,7 +69,7 @@ async fn main() -> Result<(), Box> { old_value: data[0].to_string(), new_value: data[1].to_string(), reference: data[2].to_string(), - commiter: commiter, + commiter, }) } } -- cgit v1.2.3-70-g09d2