From 80589fb9c08e3c15b31db51c7a40767ff6fbf33d Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Tue, 4 Feb 2020 22:58:37 +0100 Subject: Move source names inside the source sections. This means that the order of the sources is preserved. --- src/config.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 7b3aa4b..bbe6366 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,6 +10,7 @@ use std::path::PathBuf; #[derive(serde_derive::Serialize, serde_derive::Deserialize, Clone, PartialEq, Eq, Debug)] #[serde(deny_unknown_fields)] pub struct Source { + pub name: String, pub url: String, pub psk: Option, pub ipv4: Ipv4Set, @@ -81,7 +82,7 @@ pub struct Config { pub runtime_directory: Option, pub global: GlobalConfig, pub updater: UpdaterConfig, - pub sources: HashMap, + pub sources: Vec, } #[derive(serde_derive::Serialize, serde_derive::Deserialize)] @@ -101,7 +102,7 @@ struct ConfigRepr { refresh_sec: u32, #[serde(default, rename = "source")] - sources: HashMap, + sources: Vec, } impl From for ConfigRepr { -- cgit