From 21002f6521d2eeb8b349740efb2640551aa8f473 Mon Sep 17 00:00:00 2001 From: candifloss Date: Sat, 28 Sep 2024 16:49:48 +0530 Subject: [PATCH] commit --- src/formats/serde.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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())); } }