From 84534bbb2c2cec6e136b3d34e793a9132589f2f0 Mon Sep 17 00:00:00 2001 From: Simon Fondrie-Teitler Date: Fri, 27 Jun 2025 13:56:30 -0400 Subject: [PATCH] Clippy fixes --- bin/src/notifications.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/src/notifications.rs b/bin/src/notifications.rs index 7ed92b3..c554eb0 100644 --- a/bin/src/notifications.rs +++ b/bin/src/notifications.rs @@ -51,7 +51,7 @@ impl NotificationService { } pub fn new_handler(&self) -> mpsc::Sender { - return self.tx.clone(); + self.tx.clone() } } @@ -62,7 +62,7 @@ pub fn run_notification_worker( task_tracker.spawn(async move { let channel_name = notification_service.channel_name.unwrap_or("".into()); - if channel_name != String::from("") { + if !channel_name.is_empty() { let mut notification_statuses = HashMap::new(); let http_client = reqwest::Client::new(); @@ -117,7 +117,7 @@ pub fn run_notification_worker( } match http_client - .post(format!("{}{}", NTFY_BASE_URL, channel_name)) + .post(format!("{NTFY_BASE_URL}{channel_name}")) .body(notification.message.clone()) .send() .await @@ -133,7 +133,7 @@ pub fn run_notification_worker( } } Err(e) => { - error!("Failed to send notification to ntfy: {}", e); + error!("Failed to send notification to ntfy: {e}"); notification.failed_since_last_success += 1; } }