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.
This commit is contained in:
Manos Pitsidianakis 2019-12-01 22:29:31 +02:00
parent e5da10093d
commit b858fcb0ab
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

View File

@ -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 {