use bail! instead of panic!
This commit is contained in:
parent
29561dde41
commit
02626865bf
1 changed files with 2 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue