mirror of
https://github.com/qwjyh/xdbm
synced 2024-11-24 23:51:04 +09:00
replace HashMap with BTreeMap in Storages and Backups
to produce cleaner git log
This commit is contained in:
parent
6f8a71fe8d
commit
feb51a5653
2 changed files with 6 additions and 6 deletions
|
@ -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<String, Backup>,
|
||||
pub list: BTreeMap<String, Backup>,
|
||||
}
|
||||
|
||||
impl Backups {
|
||||
/// Empty [`Backups`].
|
||||
pub fn new() -> Backups {
|
||||
Backups {
|
||||
list: HashMap::new(),
|
||||
list: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<String, Storage>,
|
||||
pub list: BTreeMap<String, Storage>,
|
||||
}
|
||||
|
||||
impl Storages {
|
||||
/// Construct empty [`Storages`]
|
||||
pub fn new() -> Storages {
|
||||
Storages {
|
||||
list: HashMap::new(),
|
||||
list: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue