mirror of
https://github.com/qwjyh/xdbm
synced 2024-11-22 06:40:12 +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 core::panic;
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::BTreeMap,
|
||||||
fs, io,
|
fs, io,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
@ -202,14 +202,14 @@ impl Backup {
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct Backups {
|
pub struct Backups {
|
||||||
pub list: HashMap<String, Backup>,
|
pub list: BTreeMap<String, Backup>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Backups {
|
impl Backups {
|
||||||
/// Empty [`Backups`].
|
/// Empty [`Backups`].
|
||||||
pub fn new() -> Backups {
|
pub fn new() -> Backups {
|
||||||
Backups {
|
Backups {
|
||||||
list: HashMap::new(),
|
list: BTreeMap::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ use anyhow::{anyhow, Context, Result};
|
||||||
use clap::ValueEnum;
|
use clap::ValueEnum;
|
||||||
use core::panic;
|
use core::panic;
|
||||||
use serde::{Deserialize, Serialize};
|
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..
|
/// YAML file to store known storages..
|
||||||
pub const STORAGESFILE: &str = "storages.yml";
|
pub const STORAGESFILE: &str = "storages.yml";
|
||||||
|
@ -157,14 +157,14 @@ pub mod physical_drive_partition;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct Storages {
|
pub struct Storages {
|
||||||
pub list: HashMap<String, Storage>,
|
pub list: BTreeMap<String, Storage>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Storages {
|
impl Storages {
|
||||||
/// Construct empty [`Storages`]
|
/// Construct empty [`Storages`]
|
||||||
pub fn new() -> Storages {
|
pub fn new() -> Storages {
|
||||||
Storages {
|
Storages {
|
||||||
list: HashMap::new(),
|
list: BTreeMap::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue