From b858fcb0abb5fdf6743b905838faf7995d5bc0ab Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 1 Dec 2019 22:29:31 +0200 Subject: [PATCH] ui/conf: change field order Change field order because FolderConf has an extra_settings sinkhole field for serde, which catches any setting that could go to the other field. --- ui/src/conf.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/src/conf.rs b/ui/src/conf.rs index 00d01d2e..31f201a7 100644 --- a/ui/src/conf.rs +++ b/ui/src/conf.rs @@ -78,10 +78,10 @@ pub struct MailUIConf { #[serde(default)] #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct FileFolderConf { - #[serde(flatten)] - pub folder_conf: FolderConf, #[serde(flatten)] pub conf_override: MailUIConf, + #[serde(flatten)] + pub folder_conf: FolderConf, } impl FileFolderConf { @@ -326,7 +326,11 @@ impl FileSettings { pub fn validate(path: &str) -> Result<()> { let s = pp::pp(path)?; let s: FileSettings = toml::from_str(&s).map_err(|e| { - MeliError::new(format!("Config file contains errors: {}", e.to_string())) + MeliError::new(format!( + "{}:\nConfig file contains errors: {}", + path, + e.to_string() + )) })?; let backends = melib::backends::Backends::new(); for (name, acc) in s.accounts {