use bail! instead of panic!

This commit is contained in:
Quentin 2023-12-13 18:06:18 +01:00
parent 29561dde41
commit 02626865bf
Signed by: quentin
GPG Key ID: E9602264D639FF68
1 changed files with 2 additions and 2 deletions

View File

@ -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) => {