diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-01-02 02:30:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 02:30:52 +0000 |
commit | 56097de74e01a309ea49c8730be6b689dc153d8f (patch) | |
tree | 1eb56da052b26e539f0da5914dc245da3d8a1a88 | |
parent | 43ea180d8e61a617c07b59c6b97fcf4e7258477d (diff) | |
download | alacritty-56097de74e01a309ea49c8730be6b689dc153d8f.tar.gz alacritty-56097de74e01a309ea49c8730be6b689dc153d8f.zip |
Fix deserialization of untagged enums
Fixes #4634.
-rw-r--r-- | alacritty_terminal/src/config/mod.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index caa8930b..9b6f695f 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -131,7 +131,12 @@ impl Cursor { #[derive(Deserialize, Debug, Copy, Clone, PartialEq, Eq)] pub enum ConfigCursorStyle { Shape(CursorShape), - WithBlinking { shape: CursorShape, blinking: CursorBlinking }, + WithBlinking { + #[serde(default)] + shape: CursorShape, + #[serde(default)] + blinking: CursorBlinking, + }, } impl Default for ConfigCursorStyle { @@ -195,7 +200,11 @@ impl Into<bool> for CursorBlinking { #[derive(Deserialize, Debug, Clone, PartialEq, Eq)] pub enum Program { Just(String), - WithArgs { program: String, args: Vec<String> }, + WithArgs { + program: String, + #[serde(default)] + args: Vec<String>, + }, } impl Program { |