refactor(test): apply clippy suggestions

This commit is contained in:
Orhun Parmaksız 2022-08-09 23:12:58 +02:00
parent 907b337158
commit b328a11599
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90

View File

@ -215,8 +215,10 @@ mod tests {
use super::*;
#[test]
fn test_config() -> Result<()> {
let mut config = Config::default();
config.display_deprecated = true;
let mut config = Config {
display_deprecated: true,
..Default::default()
};
config.cli.display_type = DisplayType::Value;
config.cli.color.default_color = Color::Blue;
config.cli.color.section_colors = HashMap::new();
@ -224,7 +226,7 @@ mod tests {
config.tui.color.fg_color = String::new();
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
.expect("parent directory not found")
.join("config")
.join(DEFAULT_CONFIG);
config.parse(Some(path))?;