dev #3
@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user