diff --git a/src/backups.rs b/src/backups.rs index c312949..fbb4c1f 100644 --- a/src/backups.rs +++ b/src/backups.rs @@ -3,7 +3,7 @@ use core::panic; use std::{ - collections::HashMap, + collections::BTreeMap, fs, io, path::{Path, PathBuf}, }; @@ -202,14 +202,14 @@ impl Backup { #[derive(Debug, Serialize, Deserialize)] pub struct Backups { - pub list: HashMap, + pub list: BTreeMap, } impl Backups { /// Empty [`Backups`]. pub fn new() -> Backups { Backups { - list: HashMap::new(), + list: BTreeMap::new(), } } diff --git a/src/storages.rs b/src/storages.rs index b67b9cf..fd02ef3 100644 --- a/src/storages.rs +++ b/src/storages.rs @@ -9,7 +9,7 @@ use anyhow::{anyhow, Context, Result}; use clap::ValueEnum; use core::panic; use serde::{Deserialize, Serialize}; -use std::{collections::HashMap, fmt, fs, io, path, u64}; +use std::{collections::BTreeMap, fmt, fs, io, path, u64}; /// YAML file to store known storages.. pub const STORAGESFILE: &str = "storages.yml"; @@ -157,14 +157,14 @@ pub mod physical_drive_partition; #[derive(Debug, Serialize, Deserialize)] pub struct Storages { - pub list: HashMap, + pub list: BTreeMap, } impl Storages { /// Construct empty [`Storages`] pub fn new() -> Storages { Storages { - list: HashMap::new(), + list: BTreeMap::new(), } }