From b328a11599245e5fab6f4128d4bccdb1b6574721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Tue, 9 Aug 2022 23:12:58 +0200 Subject: [PATCH] refactor(test): apply clippy suggestions --- systeroid-core/src/config.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/systeroid-core/src/config.rs b/systeroid-core/src/config.rs index 29c1df5..e90cc9e 100644 --- a/systeroid-core/src/config.rs +++ b/systeroid-core/src/config.rs @@ -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))?;