dev #3

Merged
candifloss merged 14 commits from dev into main 2025-01-04 05:08:11 +00:00
Showing only changes of commit 21002f6521 - Show all commits

View File

@ -10,9 +10,9 @@ where
{ {
let mut map = serde_json::Map::new(); let mut map = serde_json::Map::new();
// Assuming actions are in pairs: [id, label, id, label, ...] // Actions are in pairs: [id, label, id, label, ...]
for chunk in actions.chunks(2) { for pair in actions.chunks(2) {
if let [id, label] = chunk { if let [id, label] = pair {
map.insert(id.clone(), serde_json::Value::String(label.clone())); map.insert(id.clone(), serde_json::Value::String(label.clone()));
} }
} }