diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-12-25 20:32:54 +0100 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2022-01-08 21:52:58 +0100 |
commit | e9bdbb80e1e67f6c491a339aae3f351f75b37344 (patch) | |
tree | c52afff276276051c7d8aebe9f31da5a70511306 | |
parent | 2c78d216ca2934595b0b56464fb84048cd979c8d (diff) | |
download | alacritty-e9bdbb80e1e67f6c491a339aae3f351f75b37344.tar.gz alacritty-e9bdbb80e1e67f6c491a339aae3f351f75b37344.zip |
Fix test failures due to CLI parameters
Fixes #5717.
-rw-r--r-- | alacritty/src/cli.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs index 21062fce..69200039 100644 --- a/alacritty/src/cli.rs +++ b/alacritty/src/cli.rs @@ -12,7 +12,7 @@ use crate::config::window::{Class, DEFAULT_NAME}; use crate::config::{serde_utils, UiConfig}; /// CLI options for the main Alacritty executable. -#[derive(StructOpt, Debug)] +#[derive(StructOpt, Default, Debug)] #[structopt(author, about, version = env!("VERSION"))] pub struct Options { /// Print all events to stdout. @@ -283,7 +283,7 @@ mod tests { let mut config = UiConfig::default(); let old_dynamic_title = config.window.dynamic_title; - Options::new().override_config(&mut config); + Options::default().override_config(&mut config); assert_eq!(old_dynamic_title, config.window.dynamic_title); } @@ -292,7 +292,7 @@ mod tests { fn dynamic_title_overridden_by_options() { let mut config = UiConfig::default(); - let options = Options { title: Some("foo".to_owned()), ..Options::new() }; + let options = Options { title: Some("foo".to_owned()), ..Options::default() }; options.override_config(&mut config); assert!(!config.window.dynamic_title); @@ -303,7 +303,7 @@ mod tests { let mut config = UiConfig::default(); config.window.title = "foo".to_owned(); - Options::new().override_config(&mut config); + Options::default().override_config(&mut config); assert!(config.window.dynamic_title); } |