diff --git a/src/notification.rs b/src/notification.rs index 7b632b0..2e92fbe 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -50,29 +50,13 @@ impl Notification { } // Key:Val pairs of actions - /*pub fn actions(&self) -> Vec<(String, String)> { - let mut actions: Vec<(String, String)> = vec![]; - let acts = &self.actions; - let act_len = acts.len(); - let mut i = 0; - while i < act_len { - // Action ID, used by the sender to id the clicked action - let action_id = &acts[i]; - // Localised human-readable string that describes the action - let action_label = &acts[i + 1]; - // Pair of (id, label) - let action_pair = (action_id.to_owned(), action_label.to_owned()); - // Add it to the Vec - actions.push(action_pair); - i += 2; - } - actions - } - */ pub fn actions(&self) -> Vec<(String, String)> { self.actions .chunks(2) - .map(|chunk| (chunk[0].clone(), chunk[1].clone())) + .map(|chunk| + (chunk[0].clone(), + chunk[1].clone()) + ) .collect() }