From 87f7bd934a19941ee9a6744bdfe1bdc8a5dd08ee Mon Sep 17 00:00:00 2001 From: InioX Date: Tue, 27 Aug 2024 14:12:41 +0200 Subject: [PATCH] fix: dump_json BTreeSet index --- src/util/color.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/color.rs b/src/util/color.rs index 506078d..68fb9a6 100644 --- a/src/util/color.rs +++ b/src/util/color.rs @@ -57,10 +57,10 @@ pub fn dump_json(schemes: &Schemes, source_color: &Argb, format: &Format) { let mut colors_normal_light: HashMap<&str, String> = HashMap::new(); let mut colors_normal_dark: HashMap<&str, String> = HashMap::new(); - - for (field, _color) in &schemes.dark { - let color_light: Rgb = rgb_from_argb(schemes.light[field]); - let color_dark: Rgb = rgb_from_argb(schemes.dark[field]); + + for ((field, color_light), (_, color_dark)) in std::iter::zip(&schemes.light, &schemes.dark) { + let color_light: Rgb = rgb_from_argb(*color_light); + let color_dark: Rgb = rgb_from_argb(*color_dark); colors_normal_light.insert(field, fmt(color_light)); colors_normal_dark.insert(field, fmt(color_dark));