remove needless update using default

Reasons:
- Every field is either turned-off entirely or assigned a value when it
  needs one.
- Avoids the situation when a new field is introduced and is assigned a
  default value when it is not desired.

Signed-off-by: Perma Alesheikh <me@prma.dev>
This commit is contained in:
Perma Alesheikh 2024-01-09 13:40:22 +03:30 committed by Clément DOUIN
parent 54287d40b8
commit 2ef477c225
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

View file

@ -219,14 +219,12 @@ impl TomlConfig {
aliases: c.alias,
#[cfg(feature = "folder-list")]
list: c.list.map(|c| c.remote),
..Default::default()
}),
envelope: config.envelope.map(|#[allow(unused)] c| EnvelopeConfig {
#[cfg(feature = "envelope-list")]
list: c.list.map(|c| c.remote),
#[cfg(feature = "envelope-watch")]
watch: c.watch.map(|c| c.remote),
..Default::default()
}),
message: config.message.map(|#[allow(unused)] c| MessageConfig {
#[cfg(feature = "message-read")]
@ -235,7 +233,6 @@ impl TomlConfig {
write: c.write.map(|c| c.remote),
#[cfg(feature = "message-send")]
send: c.send.map(|c| c.remote),
..Default::default()
}),
#[cfg(feature = "account-sync")]
sync: config.sync,