change records map to BTreeMap to get stable ordering by entry ID

This commit is contained in:
2019-12-30 13:35:21 +01:00
parent 11cf0d1ca7
commit 6e69409c1a
+2 -1
View File
@@ -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<usize, Value>,
pub cards: BTreeMap<usize, Value>,
#[serde(default)]
pub counter: usize,
}