commit
This commit is contained in:
parent
1e51c83067
commit
21002f6521
@ -10,9 +10,9 @@ where
|
||||
{
|
||||
let mut map = serde_json::Map::new();
|
||||
|
||||
// Assuming actions are in pairs: [id, label, id, label, ...]
|
||||
for chunk in actions.chunks(2) {
|
||||
if let [id, label] = chunk {
|
||||
// Actions are in pairs: [id, label, id, label, ...]
|
||||
for pair in actions.chunks(2) {
|
||||
if let [id, label] = pair {
|
||||
map.insert(id.clone(), serde_json::Value::String(label.clone()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user