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
parent
e5da10093d
commit
b858fcb0ab
|
@ -78,10 +78,10 @@ pub struct MailUIConf {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
|
||||||
pub struct FileFolderConf {
|
pub struct FileFolderConf {
|
||||||
#[serde(flatten)]
|
|
||||||
pub folder_conf: FolderConf,
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub conf_override: MailUIConf,
|
pub conf_override: MailUIConf,
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub folder_conf: FolderConf,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileFolderConf {
|
impl FileFolderConf {
|
||||||
|
@ -326,7 +326,11 @@ impl FileSettings {
|
||||||
pub fn validate(path: &str) -> Result<()> {
|
pub fn validate(path: &str) -> Result<()> {
|
||||||
let s = pp::pp(path)?;
|
let s = pp::pp(path)?;
|
||||||
let s: FileSettings = toml::from_str(&s).map_err(|e| {
|
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();
|
let backends = melib::backends::Backends::new();
|
||||||
for (name, acc) in s.accounts {
|
for (name, acc) in s.accounts {
|
||||||
|
|
Loading…
Reference in New Issue