diff --git a/crates/hyfetch/Cargo.toml b/crates/hyfetch/Cargo.toml index 77dddccf..67810177 100644 --- a/crates/hyfetch/Cargo.toml +++ b/crates/hyfetch/Cargo.toml @@ -41,7 +41,7 @@ unicode-segmentation = { workspace = true, features = [] } which = { workspace = true, features = [] } [build-dependencies] -indexmap = { workspace = true, features = ["std"] } +indexmap = { workspace = true, features = ["std", "serde"] } regex = { workspace = true, features = ["perf", "std", "unicode"] } unicode-normalization = { workspace = true, features = ["std"] } fs_extra = "1.3.0" diff --git a/crates/hyfetch/build.rs b/crates/hyfetch/build.rs index bfcac692..54b18a24 100644 --- a/crates/hyfetch/build.rs +++ b/crates/hyfetch/build.rs @@ -1,11 +1,10 @@ -use std::collections::HashMap; use std::env; use std::fmt::Write as _; use std::fs; use std::io::{BufWriter, Write}; use std::path::{Path, PathBuf}; -use fs_extra::dir::{CopyOptions}; +use fs_extra::dir::CopyOptions; use heck::ToUpperCamelCase; use indexmap::IndexMap; use regex::Regex; @@ -282,7 +281,7 @@ enum PresetEntry { Complex { colors: Vec, weights: Option> }, } -type PresetMap = HashMap; +type PresetMap = IndexMap; fn preset_codegen(json_path: &Path, out_path: &Path) -> Result<(), Box> { // 1. Read and parse the JSON file