diff options
Diffstat (limited to 'alacritty_terminal/src/config/window.rs')
-rw-r--r-- | alacritty_terminal/src/config/window.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/alacritty_terminal/src/config/window.rs b/alacritty_terminal/src/config/window.rs index f470f936..49bd70bb 100644 --- a/alacritty_terminal/src/config/window.rs +++ b/alacritty_terminal/src/config/window.rs @@ -36,8 +36,8 @@ pub struct WindowConfig { startup_mode: StartupMode, /// Window title - #[serde(deserialize_with = "failure_default")] - pub title: Option<String>, + #[serde(default = "default_title")] + pub title: String, /// Window class #[serde(deserialize_with = "from_string_or_deserialize")] @@ -56,6 +56,10 @@ pub struct WindowConfig { pub start_maximized: Option<bool>, } +pub fn default_title() -> String { + DEFAULT_NAME.to_string() +} + impl WindowConfig { pub fn startup_mode(&self) -> StartupMode { match self.start_maximized { |