From cf549f973c893729211740f0ff52d25cf3f50f7c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 11 Jul 2020 13:51:15 +0200 Subject: [PATCH] Remove useless condition --- src/helpers/notifications_helper.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/helpers/notifications_helper.rs b/src/helpers/notifications_helper.rs index bc7c52d..af235e0 100644 --- a/src/helpers/notifications_helper.rs +++ b/src/helpers/notifications_helper.rs @@ -12,20 +12,7 @@ use crate::helpers::database; /// Delete notifications pub fn delete(notification: &PartialNotification) -> ResultBoxError { - - // Check if we have to delete a specific notification or a group of similar notifications - let conditions = match notification.id { - Some(id) => { - let mut map = HashMap::new(); - map.insert("id".to_string(), mysql::Value::from(id)); - map - } - - // Delete similar notifications - None => { - notif_to_db(notification, false) - } - }; + let conditions = notif_to_db(notification, false); // Delete the notifications