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

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