From 02626865bf0f076e416db2121b44d7fcad067e29 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 13 Dec 2023 18:06:18 +0100 Subject: use bail! instead of panic! --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 2beaf21..c854340 100644 --- a/src/main.rs +++ b/src/main.rs @@ -184,10 +184,10 @@ async fn main() -> Result<()> { } }, (Command::Provider(_), AnyConfig::Companion(_)) => { - panic!("Your want to run a 'Provider' command but your configuration file has role 'Companion'."); + bail!("Your want to run a 'Provider' command but your configuration file has role 'Companion'."); }, (Command::Companion(_), AnyConfig::Provider(_)) => { - panic!("Your want to run a 'Companion' command but your configuration file has role 'Provider'."); + bail!("Your want to run a 'Companion' command but your configuration file has role 'Provider'."); }, (Command::Tools(subcommand), _) => match subcommand { ToolsCommand::CryptoRoot(crcommand) => { -- cgit v1.2.3