Skip to content

Commit

Permalink
Use BTreeMap instead of HashMap for checks file to order the output
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Aug 28, 2024
1 parent 5dfd1c7 commit 4316795
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rosey/src/runners/checker.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use std::{
collections::{BTreeMap, HashMap},
collections::BTreeMap,
fs::{create_dir_all, read_to_string, File},
io::{BufWriter, Write},
str::FromStr,
Expand All @@ -10,7 +10,7 @@ use globwalk::DirEntry;

use crate::{RoseyLocale, RoseyOptions, RoseyTranslation};

#[derive(Serialize, Deserialize, Hash, PartialEq, Eq)]
#[derive(Serialize, Deserialize, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[serde(rename_all = "camelCase")]
enum RoseyCheckStates {
Current,
Expand All @@ -25,8 +25,8 @@ struct RoseyCheck {
current: bool,
base_total: i32,
total: i32,
states: HashMap<RoseyCheckStates, i32>,
keys: HashMap<String, RoseyCheckStates>,
states: BTreeMap<RoseyCheckStates, i32>,
keys: BTreeMap<String, RoseyCheckStates>,
}

pub struct RoseyChecker {
Expand Down

0 comments on commit 4316795

Please sign in to comment.