From 6e69409c1a7954e504c3253b866bf7471fa211a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 30 Dec 2019 13:35:21 +0100 Subject: [PATCH] change records map to BTreeMap to get stable ordering by entry ID --- src/store/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/mod.rs b/src/store/mod.rs index 1f664f2..5a673ab 100644 --- a/src/store/mod.rs +++ b/src/store/mod.rs @@ -6,6 +6,7 @@ use std::collections::HashMap; use std::fs::{File, OpenOptions}; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; +use std::collections::BTreeMap; pub mod form; pub mod model; @@ -35,7 +36,7 @@ struct RepositoryConfig { #[derive(Serialize, Deserialize, Debug)] pub struct Cards { #[serde(default)] - pub cards: IndexMap, + pub cards: BTreeMap, #[serde(default)] pub counter: usize, }