From 3909494a28b88ed6be05aad29c62c5c65a525670 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Sun, 31 Dec 2023 22:43:03 +0800 Subject: [PATCH] fix(caracal-daemon): fix lints and errors --- caracal-daemon/src/cli/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/caracal-daemon/src/cli/mod.rs b/caracal-daemon/src/cli/mod.rs index 4cbdb0e..8e69ec9 100644 --- a/caracal-daemon/src/cli/mod.rs +++ b/caracal-daemon/src/cli/mod.rs @@ -115,9 +115,12 @@ mod tests { #[test] fn test_command_simple() { - match Cli::parse_from(["program_name", "version"]).commands { - Some(Commands::Version { .. }) => (), - _ => panic!(), + if let Some(Commands::Version { .. }) = + Cli::parse_from(["program_name", "version"]).commands + { + // everything is good. + } else { + panic!(); } } }