commit
This commit is contained in:
parent
9dd8b12faf
commit
b572fa1cc2
@ -4,10 +4,7 @@ use std::collections::HashMap;
|
|||||||
use std::hash::BuildHasher;
|
use std::hash::BuildHasher;
|
||||||
use zvariant::OwnedValue; */
|
use zvariant::OwnedValue; */
|
||||||
|
|
||||||
pub fn serialize_actions<S>(
|
pub fn serialize_actions<S>(actions: &[String], serializer: S) -> Result<S::Ok, S::Error>
|
||||||
actions: &[String], // Changed to a slice
|
|
||||||
serializer: S,
|
|
||||||
) -> Result<S::Ok, S::Error>
|
|
||||||
where
|
where
|
||||||
S: Serializer,
|
S: Serializer,
|
||||||
{
|
{
|
||||||
@ -22,6 +19,7 @@ where
|
|||||||
|
|
||||||
map.serialize(serializer)
|
map.serialize(serializer)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pub fn serialize_hints<S, H>(
|
pub fn serialize_hints<S, H>(
|
||||||
hints: &HashMap<String, OwnedValue, H>,
|
hints: &HashMap<String, OwnedValue, H>,
|
||||||
|
@ -50,7 +50,7 @@ impl Notification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Key:Val pairs of actions
|
// Key:Val pairs of actions
|
||||||
pub fn actions(&self) -> Vec<(String, String)> {
|
/*pub fn actions(&self) -> Vec<(String, String)> {
|
||||||
let mut actions: Vec<(String, String)> = vec![];
|
let mut actions: Vec<(String, String)> = vec![];
|
||||||
let acts = &self.actions;
|
let acts = &self.actions;
|
||||||
let act_len = acts.len();
|
let act_len = acts.len();
|
||||||
@ -68,13 +68,13 @@ impl Notification {
|
|||||||
}
|
}
|
||||||
actions
|
actions
|
||||||
}
|
}
|
||||||
/*
|
*/
|
||||||
pub fn actions(&self) -> Vec<(String, String)> {
|
pub fn actions(&self) -> Vec<(String, String)> {
|
||||||
self.actions
|
self.actions
|
||||||
.chunks(2)
|
.chunks(2)
|
||||||
.map(|chunk| (chunk[0].clone(), chunk[1].clone()))
|
.map(|chunk| (chunk[0].clone(), chunk[1].clone()))
|
||||||
.collect()
|
.collect()
|
||||||
} */
|
}
|
||||||
|
|
||||||
// Hints
|
// Hints
|
||||||
pub fn hints(&self) -> &HashMap<String, OwnedValue> {
|
pub fn hints(&self) -> &HashMap<String, OwnedValue> {
|
||||||
|
Loading…
Reference in New Issue
Block a user