From 8e5d63ad97b66fa5783d579241ba82c7499a47d2 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Mon, 18 Nov 2024 05:12:42 +0100 Subject: [PATCH] fix: messed up packages order replace HashMaps with BTreeMaps --- src/config.rs | 4 ++-- src/verfiles.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 9f4cddd..21f44ec 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; use std::{ - collections::HashMap, + collections::BTreeMap, env, fs, io::Write, path::{Path, PathBuf}, @@ -86,7 +86,7 @@ impl Package { pub struct Config { pub __config__: Option, #[serde(flatten)] - pub packages: HashMap, + pub packages: BTreeMap, } pub fn load(custom_path: Option) -> (Config, PathBuf, Option) { diff --git a/src/verfiles.rs b/src/verfiles.rs index 82ae9e6..3b4092a 100644 --- a/src/verfiles.rs +++ b/src/verfiles.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use std::{collections::HashMap, fs, io::Write, path::Path}; +use std::{collections::BTreeMap, fs, io::Write, path::Path}; use crate::config::ConfigTable; @@ -24,7 +24,7 @@ pub struct Package { #[derive(Clone, Serialize, Deserialize)] pub struct Data { - pub data: HashMap, + pub data: BTreeMap, } #[derive(Clone, Serialize, Deserialize)]