From 18aa509c7328f766a4e64277b52a1e8cb6c8e4e7 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sat, 27 Apr 2024 23:49:04 -0700 Subject: [PATCH] Fix gtk tags output --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1582e8c..0bf0dcb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,7 +135,9 @@ impl Serialize for Env { name_id_map.reserve(self.output_names.len()); let mut id = 0; for (_, value) in &self.output_names { - name_id_map.insert(value, id); + if !name_id_map.contains_key(value.as_str()) { + name_id_map.insert(value, id); + } id += 1; } state.serialize_field("gtk_ids", &name_id_map)?;