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.
memfd
Manos Pitsidianakis 2019-12-01 22:29:31 +02:00
parent e5da10093d
commit b858fcb0ab
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 7 additions and 3 deletions

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 {