From 328aed4b315372b3e79f6fac36da5364496408df Mon Sep 17 00:00:00 2001 From: Ammar Abou Zor Date: Tue, 22 Oct 2024 15:30:14 +0200 Subject: [PATCH] Build CLI: Default values for user configurations Use default values when configs don't exist to avoid forcing the users to specify all options --- cli/src/user_config.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/src/user_config.rs b/cli/src/user_config.rs index e37591b3d..61c31a49c 100644 --- a/cli/src/user_config.rs +++ b/cli/src/user_config.rs @@ -15,7 +15,9 @@ static USER_CONFIGURATION: OnceLock = OnceLock::new(); /// Represents the configuration of this tool on the user level, providing settings like /// [`UserShell`] and [`UiMode`] besides methods to load this configurations from a file. pub struct UserConfiguration { + #[serde(default)] pub shell: UserShell, + #[serde(default)] pub ui_mode: UiMode, }