diff --git a/src/formats/serde.rs b/src/formats/serde.rs index 66bf771..f18df96 100644 --- a/src/formats/serde.rs +++ b/src/formats/serde.rs @@ -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())); } }