From 39a3f10723a40b1543a783333c520cdd5b0c8e96 Mon Sep 17 00:00:00 2001 From: Eduard Toloza Date: Sun, 7 Apr 2019 22:39:41 -0500 Subject: [PATCH] Improve logic. --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 845a585..1c665f0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,15 +68,15 @@ fn upcheck() { let available_updates = String::from_utf8(available_updates.stdout) .expect("Output of checkupdates could not be parsed as valid UTF-8."); // Send the notification if updates are or not available - if &available_updates.len() > &0 { + if available_updates.is_empty() { send_notification( - "The following updates are available:", + "No updates are available.", &available_updates, "dialog-information", ); } else { send_notification( - "No updates are available.", + "The following updates are available:", &available_updates, "dialog-information", );