Skip to content

Commit

Permalink
fix: messed up packages order
Browse files Browse the repository at this point in the history
replace HashMaps with BTreeMaps
  • Loading branch information
adamperkowski committed Nov 18, 2024
1 parent 4b7a48a commit 8e5d63a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use std::{
collections::HashMap,
collections::BTreeMap,
env, fs,
io::Write,
path::{Path, PathBuf},
Expand Down Expand Up @@ -86,7 +86,7 @@ impl Package {
pub struct Config {
pub __config__: Option<ConfigTable>,
#[serde(flatten)]
pub packages: HashMap<String, Package>,
pub packages: BTreeMap<String, Package>,
}

pub fn load(custom_path: Option<String>) -> (Config, PathBuf, Option<Keyfile>) {
Expand Down
4 changes: 2 additions & 2 deletions src/verfiles.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -24,7 +24,7 @@ pub struct Package {

#[derive(Clone, Serialize, Deserialize)]
pub struct Data {
pub data: HashMap<String, Package>,
pub data: BTreeMap<String, Package>,
}

#[derive(Clone, Serialize, Deserialize)]
Expand Down

0 comments on commit 8e5d63a

Please sign in to comment.