From 2ef477c22546f915e7e2197d88e8e91e35e09d9f Mon Sep 17 00:00:00 2001 From: Perma Alesheikh Date: Tue, 9 Jan 2024 13:40:22 +0330 Subject: [PATCH] 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 --- src/config/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 413a470..2eedd13 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -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,